From dee3895f1656bb5d2359fdb7c5d991d878048276 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 27 May 2021 16:13:07 -0400 Subject: [PATCH 1/5] chore: migrate to owlbot --- .github/.OwlBot.lock.yaml | 3 + .github/.OwlBot.yaml | 29 ++++++++ google-cloud-os-config-bom/pom.xml | 29 ++++++-- google-cloud-os-config/pom.xml | 22 ++++++- grpc-google-cloud-os-config-v1alpha/pom.xml | 69 ++++++++++++++++++++ grpc-google-cloud-os-config-v1beta/pom.xml | 69 ++++++++++++++++++++ owlbot.py | 24 +++++++ pom.xml | 28 +++++++- proto-google-cloud-os-config-v1alpha/pom.xml | 46 +++++++++++++ proto-google-cloud-os-config-v1beta/pom.xml | 46 +++++++++++++ synth.py | 36 ---------- versions.txt | 6 +- 12 files changed, 361 insertions(+), 46 deletions(-) create mode 100644 .github/.OwlBot.lock.yaml create mode 100644 .github/.OwlBot.yaml create mode 100644 grpc-google-cloud-os-config-v1alpha/pom.xml create mode 100644 grpc-google-cloud-os-config-v1beta/pom.xml create mode 100644 owlbot.py create mode 100644 proto-google-cloud-os-config-v1alpha/pom.xml create mode 100644 proto-google-cloud-os-config-v1beta/pom.xml delete mode 100644 synth.py diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 00000000..37e64472 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:ee698481139bf3df35cd83d2f17f9670ee914d6184f8909a81d672a6abaf0e72 + image: gcr.io/repo-automation-bots/owlbot-java:latest diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 00000000..a6f82b69 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,29 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-copy-regex: +- source: "/google/cloud/osconfig/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-os-config-$1/src" +- source: "/google/cloud/osconfig/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-os-config-$1/src" +- source: "/google/cloud/osconfig/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-os-config/src" diff --git a/google-cloud-os-config-bom/pom.xml b/google-cloud-os-config-bom/pom.xml index 0825ce67..1e67687c 100644 --- a/google-cloud-os-config-bom/pom.xml +++ b/google-cloud-os-config-bom/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -60,12 +60,26 @@ - com.google.cloud google-cloud-os-config 1.2.2 + + com.google.api.grpc + grpc-google-cloud-os-config-v1 + 1.2.2 + + + com.google.api.grpc + grpc-google-cloud-os-config-v1beta + 1.2.2 + + + com.google.api.grpc + grpc-google-cloud-os-config-v1alpha + 1.2.2 + com.google.api.grpc proto-google-cloud-os-config-v1 @@ -73,8 +87,13 @@ com.google.api.grpc - grpc-google-cloud-os-config-v1 - 1.2.2 + proto-google-cloud-os-config-v1alpha + 1.2.2 + + + com.google.api.grpc + proto-google-cloud-os-config-v1beta + 1.2.2 @@ -90,4 +109,4 @@ - \ No newline at end of file + diff --git a/google-cloud-os-config/pom.xml b/google-cloud-os-config/pom.xml index 234a8b71..b89df7c2 100644 --- a/google-cloud-os-config/pom.xml +++ b/google-cloud-os-config/pom.xml @@ -1,4 +1,4 @@ - + 4.0.0 com.google.cloud @@ -42,6 +42,14 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-os-config-v1beta + + + com.google.api.grpc + proto-google-cloud-os-config-v1alpha + com.google.api.grpc proto-google-cloud-os-config-v1 @@ -80,6 +88,16 @@ grpc-google-cloud-os-config-v1 test + + com.google.api.grpc + grpc-google-cloud-os-config-v1alpha + test + + + com.google.api.grpc + grpc-google-cloud-os-config-v1beta + test + com.google.api @@ -112,4 +130,4 @@ - \ No newline at end of file + diff --git a/grpc-google-cloud-os-config-v1alpha/pom.xml b/grpc-google-cloud-os-config-v1alpha/pom.xml new file mode 100644 index 00000000..85e230b5 --- /dev/null +++ b/grpc-google-cloud-os-config-v1alpha/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-os-config-v1alpha + 1.2.2 + grpc-google-cloud-os-config-v1alpha + GRPC library for google-cloud-os-config + + com.google.cloud + google-cloud-os-config-parent + 1.2.2 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-os-config-v1alpha + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-os-config-v1beta/pom.xml b/grpc-google-cloud-os-config-v1beta/pom.xml new file mode 100644 index 00000000..c7e2acb8 --- /dev/null +++ b/grpc-google-cloud-os-config-v1beta/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-os-config-v1beta + 1.2.2 + grpc-google-cloud-os-config-v1beta + GRPC library for google-cloud-os-config + + com.google.cloud + google-cloud-os-config-parent + 1.2.2 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-os-config-v1beta + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 00000000..c521a8c9 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(excludes=["samples/install-without-bom/*"]) diff --git a/pom.xml b/pom.xml index 452083f9..0d506872 100644 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,26 @@ google-cloud-os-config 1.2.2 + + com.google.api.grpc + proto-google-cloud-os-config-v1beta + 1.2.2 + + + com.google.api.grpc + proto-google-cloud-os-config-v1alpha + 1.2.2 + + + com.google.api.grpc + grpc-google-cloud-os-config-v1alpha + 1.2.2 + + + com.google.api.grpc + grpc-google-cloud-os-config-v1beta + 1.2.2 + com.google.api.grpc proto-google-cloud-os-config-v1 @@ -119,8 +139,12 @@ google-cloud-os-config - proto-google-cloud-os-config-v1 grpc-google-cloud-os-config-v1 + grpc-google-cloud-os-config-v1beta + grpc-google-cloud-os-config-v1alpha + proto-google-cloud-os-config-v1 + proto-google-cloud-os-config-v1alpha + proto-google-cloud-os-config-v1beta google-cloud-os-config-bom @@ -193,4 +217,4 @@ - \ No newline at end of file + diff --git a/proto-google-cloud-os-config-v1alpha/pom.xml b/proto-google-cloud-os-config-v1alpha/pom.xml new file mode 100644 index 00000000..3b50fffb --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-os-config-v1alpha + 1.2.2 + proto-google-cloud-os-config-v1alpha + Proto library for google-cloud-os-config + + com.google.cloud + google-cloud-os-config-parent + 1.2.2 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-os-config-v1beta/pom.xml b/proto-google-cloud-os-config-v1beta/pom.xml new file mode 100644 index 00000000..fc56ab8f --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-os-config-v1beta + 1.2.2 + proto-google-cloud-os-config-v1beta + Proto library for google-cloud-os-config + + com.google.cloud + google-cloud-os-config-parent + 1.2.2 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/synth.py b/synth.py deleted file mode 100644 index 90ab47d0..00000000 --- a/synth.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""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(excludes=[ - 'samples/install-without-bom/*' -]) \ No newline at end of file diff --git a/versions.txt b/versions.txt index 5831b760..c88e7a88 100644 --- a/versions.txt +++ b/versions.txt @@ -2,5 +2,9 @@ # module:released-version:current-version google-cloud-os-config:1.2.2:1.2.2 +grpc-google-cloud-os-config-v1:1.2.2:1.2.2 +grpc-google-cloud-os-config-v1beta:1.2.2:1.2.2 +grpc-google-cloud-os-config-v1alpha:1.2.2:1.2.2 proto-google-cloud-os-config-v1:1.2.2:1.2.2 -grpc-google-cloud-os-config-v1:1.2.2:1.2.2 \ No newline at end of file +proto-google-cloud-os-config-v1alpha:1.2.2:1.2.2 +proto-google-cloud-os-config-v1beta:1.2.2:1.2.2 From e17c91e5e44edc78cd4fcf87517e4fca8c624c2d Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 27 May 2021 16:15:07 -0400 Subject: [PATCH 2/5] feat: add v1alpha and v1beta clients --- .github/generated-files-bot.yml | 1 + .github/release-please.yml | 3 +- .github/workflows/ci.yaml | 6 +- .kokoro/build.sh | 4 +- .kokoro/release/publish_javadoc11.sh | 9 + .../osconfig/v1/OsConfigServiceClient.java | 11 + .../cloud/osconfig/v1/package-info.java | 3 + .../v1alpha/OsConfigZonalServiceClient.java | 2496 + .../v1alpha/OsConfigZonalServiceSettings.java | 410 + .../osconfig/v1alpha/gapic_metadata.json | 54 + .../cloud/osconfig/v1alpha/package-info.java | 41 + ...pcOsConfigZonalServiceCallableFactory.java | 115 + .../stub/GrpcOsConfigZonalServiceStub.java | 765 + .../stub/OsConfigZonalServiceStub.java | 187 + .../OsConfigZonalServiceStubSettings.java | 1192 + .../v1beta/OsConfigServiceClient.java | 1783 + .../v1beta/OsConfigServiceSettings.java | 391 + .../cloud/osconfig/v1beta/gapic_metadata.json | 63 + .../cloud/osconfig/v1beta/package-info.java | 48 + .../GrpcOsConfigServiceCallableFactory.java | 115 + .../v1beta/stub/GrpcOsConfigServiceStub.java | 847 + .../v1beta/stub/OsConfigServiceStub.java | 150 + .../stub/OsConfigServiceStubSettings.java | 1029 + .../v1/OsConfigServiceClientTest.java | 135 +- .../cloud/osconfig/v1/it/ITSystemTest.java | 222 - .../v1alpha/MockOsConfigZonalService.java | 59 + .../v1alpha/MockOsConfigZonalServiceImpl.java | 318 + .../OsConfigZonalServiceClientTest.java | 1212 + .../osconfig/v1beta/MockOsConfigService.java | 59 + .../v1beta/MockOsConfigServiceImpl.java | 389 + .../v1beta/OsConfigServiceClientTest.java | 1044 + .../v1alpha/OsConfigZonalServiceGrpc.java | 1878 + .../osconfig/v1beta/OsConfigServiceGrpc.java | 2156 + .../clirr-ignored-differences.xml | 19 + .../google/cloud/osconfig/v1alpha/CVSSv3.java | 3146 + .../osconfig/v1alpha/CVSSv3OrBuilder.java | 287 + .../google/cloud/osconfig/v1alpha/Common.java | 68 + .../osconfig/v1alpha/ConfigCommonProto.java | 116 + .../CreateOSPolicyAssignmentRequest.java | 1197 + ...ateOSPolicyAssignmentRequestOrBuilder.java | 134 + .../DeleteOSPolicyAssignmentRequest.java | 661 + ...eteOSPolicyAssignmentRequestOrBuilder.java | 54 + .../osconfig/v1alpha/FixedOrPercent.java | 808 + .../v1alpha/FixedOrPercentOrBuilder.java | 79 + ...etInstanceOSPoliciesComplianceRequest.java | 713 + ...eOSPoliciesComplianceRequestOrBuilder.java | 66 + .../osconfig/v1alpha/GetInventoryRequest.java | 845 + .../v1alpha/GetInventoryRequestOrBuilder.java | 91 + .../v1alpha/GetOSPolicyAssignmentRequest.java | 671 + ...GetOSPolicyAssignmentRequestOrBuilder.java | 58 + .../GetVulnerabilityReportRequest.java | 693 + ...etVulnerabilityReportRequestOrBuilder.java | 64 + .../cloud/osconfig/v1alpha/InstanceName.java | 223 + .../v1alpha/InstanceOSPoliciesCompliance.java | 4327 ++ .../InstanceOSPoliciesComplianceName.java | 227 + ...InstanceOSPoliciesComplianceOrBuilder.java | 318 + .../InstanceOSPoliciesComplianceProto.java | 178 + .../cloud/osconfig/v1alpha/Inventories.java | 338 + .../cloud/osconfig/v1alpha/Inventory.java | 17906 ++++++ .../cloud/osconfig/v1alpha/InventoryName.java | 223 + .../osconfig/v1alpha/InventoryOrBuilder.java | 213 + .../cloud/osconfig/v1alpha/InventoryView.java | 178 + ...tInstanceOSPoliciesCompliancesRequest.java | 1169 + ...OSPoliciesCompliancesRequestOrBuilder.java | 129 + ...InstanceOSPoliciesCompliancesResponse.java | 1248 + ...SPoliciesCompliancesResponseOrBuilder.java | 117 + .../v1alpha/ListInventoriesRequest.java | 1309 + .../ListInventoriesRequestOrBuilder.java | 158 + .../v1alpha/ListInventoriesResponse.java | 1134 + .../ListInventoriesResponseOrBuilder.java | 102 + ...istOSPolicyAssignmentRevisionsRequest.java | 952 + ...cyAssignmentRevisionsRequestOrBuilder.java | 96 + ...stOSPolicyAssignmentRevisionsResponse.java | 1200 + ...yAssignmentRevisionsResponseOrBuilder.java | 110 + .../ListOSPolicyAssignmentsRequest.java | 942 + ...stOSPolicyAssignmentsRequestOrBuilder.java | 96 + .../ListOSPolicyAssignmentsResponse.java | 1182 + ...tOSPolicyAssignmentsResponseOrBuilder.java | 108 + .../ListVulnerabilityReportsRequest.java | 1160 + ...tVulnerabilityReportsRequestOrBuilder.java | 131 + .../ListVulnerabilityReportsResponse.java | 1197 + ...VulnerabilityReportsResponseOrBuilder.java | 111 + .../cloud/osconfig/v1alpha/LocationName.java | 192 + .../cloud/osconfig/v1alpha/OSPolicy.java | 33216 ++++++++++ .../osconfig/v1alpha/OSPolicyAssignment.java | 7921 +++ .../v1alpha/OSPolicyAssignmentName.java | 231 + .../OSPolicyAssignmentOperationMetadata.java | 1966 + ...yAssignmentOperationMetadataOrBuilder.java | 183 + .../v1alpha/OSPolicyAssignmentOrBuilder.java | 418 + .../osconfig/v1alpha/OSPolicyAssignments.java | 354 + .../v1alpha/OSPolicyComplianceState.java | 227 + .../osconfig/v1alpha/OSPolicyOrBuilder.java | 225 + .../cloud/osconfig/v1alpha/OSPolicyProto.java | 494 + .../v1alpha/OSPolicyResourceCompliance.java | 2405 + .../OSPolicyResourceComplianceOrBuilder.java | 183 + .../v1alpha/OSPolicyResourceConfigStep.java | 1339 + .../OSPolicyResourceConfigStepOrBuilder.java | 102 + .../v1alpha/OsConfigZonalServiceProto.java | 172 + .../UpdateOSPolicyAssignmentRequest.java | 1059 + ...ateOSPolicyAssignmentRequestOrBuilder.java | 104 + .../osconfig/v1alpha/VulnerabilityProto.java | 254 + .../osconfig/v1alpha/VulnerabilityReport.java | 6730 +++ .../v1alpha/VulnerabilityReportName.java | 225 + .../v1alpha/VulnerabilityReportOrBuilder.java | 160 + .../osconfig/v1alpha/config_common.proto | 120 + .../instance_os_policies_compliance.proto | 173 + .../cloud/osconfig/v1alpha/inventory.proto | 359 + .../cloud/osconfig/v1alpha/os_policy.proto | 535 + .../v1alpha/os_policy_assignments.proto | 358 + .../osconfig/v1alpha/osconfig_common.proto | 39 + .../v1alpha/osconfig_zonal_service.proto | 194 + .../osconfig/v1alpha/vulnerability.proto | 337 + .../clirr-ignored-differences.xml | 5 + .../cloud/osconfig/v1beta/GuestPolicies.java | 50397 ++++++++++++++++ .../osconfig/v1beta/GuestPolicyName.java | 192 + .../cloud/osconfig/v1beta/OsConfigProto.java | 152 + .../osconfig/v1beta/PatchDeployments.java | 16172 +++++ .../cloud/osconfig/v1beta/PatchJobs.java | 35097 +++++++++++ .../cloud/osconfig/v1beta/ProjectName.java | 168 + .../osconfig/v1beta/guest_policies.proto | 773 + .../osconfig/v1beta/osconfig_service.proto | 157 + .../osconfig/v1beta/patch_deployments.proto | 227 + .../cloud/osconfig/v1beta/patch_jobs.proto | 638 + 123 files changed, 227762 insertions(+), 238 deletions(-) create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceCallableFactory.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceCallableFactory.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java create mode 100644 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java delete mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/it/ITSystemTest.java create mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalService.java create mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java create mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java create mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigService.java create mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java create mode 100644 google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java create mode 100644 grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java create mode 100644 grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java create mode 100644 proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3OrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercent.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercentOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceName.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceName.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryName.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryView.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponse.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponseOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponseOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponseOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponse.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponseOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/LocationName.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentName.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignments.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequest.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequestOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportName.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto create mode 100644 proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto create mode 100644 proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java create mode 100644 proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicyName.java create mode 100644 proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java create mode 100644 proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java create mode 100644 proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java create mode 100644 proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/ProjectName.java create mode 100644 proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto create mode 100644 proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto create mode 100644 proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto create mode 100644 proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index 47c2ba13..c644a24e 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -9,3 +9,4 @@ ignoreAuthors: - 'renovate-bot' - 'yoshi-automation' - 'release-please[bot]' +- 'gcf-owl-bot[bot]' diff --git a/.github/release-please.yml b/.github/release-please.yml index dce2c845..8ca7f9ca 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,3 @@ +bumpMinorPreMajor: true +handleGHRelease: true releaseType: java-yoshi -bumpMinorPreMajor: true \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index def8b3a2..0195b32f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,6 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: test - - name: coverage - uses: codecov/codecov-action@v1 - with: - name: actions ${{matrix.java}} windows: runs-on: windows-latest steps: @@ -80,4 +76,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr \ No newline at end of file + JOB_TYPE: clirr diff --git a/.kokoro/build.sh b/.kokoro/build.sh index bddc4786..edfbd666 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -23,8 +23,8 @@ cd ${scriptDir}/.. # include common functions source ${scriptDir}/common.sh -# Print out Java version -java -version +# Print out Maven & Java version +mvn -version echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index c349db47..174c006b 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -42,6 +42,8 @@ mvn clean site -B -q -P docFX # copy README to docfx-yml dir and rename index.md cp README.md target/docfx-yml/index.md +# copy CHANGELOG to docfx-yml dir and rename history.md +cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml @@ -49,6 +51,13 @@ pushd target/docfx-yml python3 -m docuploader create-metadata \ --name ${NAME} \ --version ${VERSION} \ + --xrefs devsite://java/gax \ + --xrefs devsite://java/google-cloud-core \ + --xrefs devsite://java/api-common \ + --xrefs devsite://java/proto-google-common-protos \ + --xrefs devsite://java/google-api-client \ + --xrefs devsite://java/google-http-client \ + --xrefs devsite://java/protobuf \ --language java # upload yml to production bucket 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 index ccde808e..0ce73511 100644 --- 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 @@ -51,9 +51,12 @@ * PatchJobs.ExecutePatchJobRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) * .setDescription("description-1724546052") + * .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + * .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request); * } @@ -173,9 +176,12 @@ public OsConfigServiceStub getStub() { * PatchJobs.ExecutePatchJobRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) * .setDescription("description-1724546052") + * .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + * .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request); * } @@ -200,9 +206,12 @@ public final PatchJobs.PatchJob executePatchJob(PatchJobs.ExecutePatchJobRequest * PatchJobs.ExecutePatchJobRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) * .setDescription("description-1724546052") + * .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + * .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * ApiFuture future = * osConfigServiceClient.executePatchJobCallable().futureCall(request); @@ -756,6 +765,7 @@ public final PatchDeployments.PatchDeployment createPatchDeployment( * PatchDeployments.CreatePatchDeploymentRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) * .setPatchDeploymentId("patchDeploymentId-1180405976") + * .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build()) * .build(); * PatchDeployments.PatchDeployment response = * osConfigServiceClient.createPatchDeployment(request); @@ -782,6 +792,7 @@ public final PatchDeployments.PatchDeployment createPatchDeployment( * PatchDeployments.CreatePatchDeploymentRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) * .setPatchDeploymentId("patchDeploymentId-1180405976") + * .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build()) * .build(); * ApiFuture future = * osConfigServiceClient.createPatchDeploymentCallable().futureCall(request); 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 index cb87c255..ea3de907 100644 --- 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 @@ -32,9 +32,12 @@ * PatchJobs.ExecutePatchJobRequest.newBuilder() * .setParent(ProjectName.of("[PROJECT]").toString()) * .setDescription("description-1724546052") + * .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + * .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) * .setDuration(Duration.newBuilder().build()) * .setDryRun(true) * .setDisplayName("displayName1714148973") + * .setRollout(PatchJobs.PatchRollout.newBuilder().build()) * .build(); * PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request); * } diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java new file mode 100644 index 00000000..bbee35f3 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java @@ -0,0 +1,2496 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1alpha.stub.OsConfigZonalServiceStub; +import com.google.cloud.osconfig.v1alpha.stub.OsConfigZonalServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Zonal OS Config API + * + *

The OS Config service is the server-side component that allows users to manage package + * installations and patch jobs for Compute Engine VM 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: + * + *

{@code
+ * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+ *     OsConfigZonalServiceClient.create()) {
+ *   OSPolicyAssignmentName name =
+ *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
+ *   OSPolicyAssignment response = osConfigZonalServiceClient.getOSPolicyAssignment(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * OsConfigZonalServiceSettings osConfigZonalServiceSettings =
+ *     OsConfigZonalServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * OsConfigZonalServiceClient osConfigZonalServiceClient =
+ *     OsConfigZonalServiceClient.create(osConfigZonalServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * OsConfigZonalServiceSettings osConfigZonalServiceSettings =
+ *     OsConfigZonalServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * OsConfigZonalServiceClient osConfigZonalServiceClient =
+ *     OsConfigZonalServiceClient.create(osConfigZonalServiceSettings);
+ * }
+ * + *

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

This method also creates the first revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build();
+   *   String osPolicyAssignmentId = "osPolicyAssignmentId-44079074";
+   *   OSPolicyAssignment response =
+   *       osConfigZonalServiceClient
+   *           .createOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * @param osPolicyAssignment Required. The OS policy assignment to be created. + * @param osPolicyAssignmentId Required. The logical name of the OS policy assignment in the + * project with the following restrictions: + *
    + *
  • 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. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createOSPolicyAssignmentAsync( + LocationName parent, OSPolicyAssignment osPolicyAssignment, String osPolicyAssignmentId) { + CreateOSPolicyAssignmentRequest request = + CreateOSPolicyAssignmentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setOsPolicyAssignment(osPolicyAssignment) + .setOsPolicyAssignmentId(osPolicyAssignmentId) + .build(); + return createOSPolicyAssignmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS policy assignment. + * + *

This method also creates the first revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build();
+   *   String osPolicyAssignmentId = "osPolicyAssignmentId-44079074";
+   *   OSPolicyAssignment response =
+   *       osConfigZonalServiceClient
+   *           .createOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * @param osPolicyAssignment Required. The OS policy assignment to be created. + * @param osPolicyAssignmentId Required. The logical name of the OS policy assignment in the + * project with the following restrictions: + *
    + *
  • 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. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createOSPolicyAssignmentAsync( + String parent, OSPolicyAssignment osPolicyAssignment, String osPolicyAssignmentId) { + CreateOSPolicyAssignmentRequest request = + CreateOSPolicyAssignmentRequest.newBuilder() + .setParent(parent) + .setOsPolicyAssignment(osPolicyAssignment) + .setOsPolicyAssignmentId(osPolicyAssignmentId) + .build(); + return createOSPolicyAssignmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS policy assignment. + * + *

This method also creates the first revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   CreateOSPolicyAssignmentRequest request =
+   *       CreateOSPolicyAssignmentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOsPolicyAssignment(OSPolicyAssignment.newBuilder().build())
+   *           .setOsPolicyAssignmentId("osPolicyAssignmentId-44079074")
+   *           .build();
+   *   OSPolicyAssignment response =
+   *       osConfigZonalServiceClient.createOSPolicyAssignmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest request) { + return createOSPolicyAssignmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS policy assignment. + * + *

This method also creates the first revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   CreateOSPolicyAssignmentRequest request =
+   *       CreateOSPolicyAssignmentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOsPolicyAssignment(OSPolicyAssignment.newBuilder().build())
+   *           .setOsPolicyAssignmentId("osPolicyAssignmentId-44079074")
+   *           .build();
+   *   OperationFuture future =
+   *       osConfigZonalServiceClient
+   *           .createOSPolicyAssignmentOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   OSPolicyAssignment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationCallable() { + return stub.createOSPolicyAssignmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS policy assignment. + * + *

This method also creates the first revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   CreateOSPolicyAssignmentRequest request =
+   *       CreateOSPolicyAssignmentRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setOsPolicyAssignment(OSPolicyAssignment.newBuilder().build())
+   *           .setOsPolicyAssignmentId("osPolicyAssignmentId-44079074")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.createOSPolicyAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createOSPolicyAssignmentCallable() { + return stub.createOSPolicyAssignmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an existing OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   OSPolicyAssignment response =
+   *       osConfigZonalServiceClient
+   *           .updateOSPolicyAssignmentAsync(osPolicyAssignment, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param osPolicyAssignment Required. The updated OS policy assignment. + * @param updateMask Optional. Field mask that controls which fields of the assignment should be + * updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateOSPolicyAssignmentAsync(OSPolicyAssignment osPolicyAssignment, FieldMask updateMask) { + UpdateOSPolicyAssignmentRequest request = + UpdateOSPolicyAssignmentRequest.newBuilder() + .setOsPolicyAssignment(osPolicyAssignment) + .setUpdateMask(updateMask) + .build(); + return updateOSPolicyAssignmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an existing OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   UpdateOSPolicyAssignmentRequest request =
+   *       UpdateOSPolicyAssignmentRequest.newBuilder()
+   *           .setOsPolicyAssignment(OSPolicyAssignment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OSPolicyAssignment response =
+   *       osConfigZonalServiceClient.updateOSPolicyAssignmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateOSPolicyAssignmentAsync(UpdateOSPolicyAssignmentRequest request) { + return updateOSPolicyAssignmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an existing OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   UpdateOSPolicyAssignmentRequest request =
+   *       UpdateOSPolicyAssignmentRequest.newBuilder()
+   *           .setOsPolicyAssignment(OSPolicyAssignment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       osConfigZonalServiceClient
+   *           .updateOSPolicyAssignmentOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   OSPolicyAssignment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationCallable() { + return stub.updateOSPolicyAssignmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an existing OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   UpdateOSPolicyAssignmentRequest request =
+   *       UpdateOSPolicyAssignmentRequest.newBuilder()
+   *           .setOsPolicyAssignment(OSPolicyAssignment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.updateOSPolicyAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateOSPolicyAssignmentCallable() { + return stub.updateOSPolicyAssignmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve an existing OS policy assignment. + * + *

This method always returns the latest revision. In order to retrieve a previous revision of + * the assignment, also provide the revision ID in the `name` parameter. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   OSPolicyAssignmentName name =
+   *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
+   *   OSPolicyAssignment response = osConfigZonalServiceClient.getOSPolicyAssignment(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of OS policy assignment. + *

Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}{@literal @}{revisionId}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OSPolicyAssignment getOSPolicyAssignment(OSPolicyAssignmentName name) { + GetOSPolicyAssignmentRequest request = + GetOSPolicyAssignmentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getOSPolicyAssignment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve an existing OS policy assignment. + * + *

This method always returns the latest revision. In order to retrieve a previous revision of + * the assignment, also provide the revision ID in the `name` parameter. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name =
+   *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]").toString();
+   *   OSPolicyAssignment response = osConfigZonalServiceClient.getOSPolicyAssignment(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of OS policy assignment. + *

Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}{@literal @}{revisionId}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OSPolicyAssignment getOSPolicyAssignment(String name) { + GetOSPolicyAssignmentRequest request = + GetOSPolicyAssignmentRequest.newBuilder().setName(name).build(); + return getOSPolicyAssignment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve an existing OS policy assignment. + * + *

This method always returns the latest revision. In order to retrieve a previous revision of + * the assignment, also provide the revision ID in the `name` parameter. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetOSPolicyAssignmentRequest request =
+   *       GetOSPolicyAssignmentRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   OSPolicyAssignment response = osConfigZonalServiceClient.getOSPolicyAssignment(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 OSPolicyAssignment getOSPolicyAssignment(GetOSPolicyAssignmentRequest request) { + return getOSPolicyAssignmentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve an existing OS policy assignment. + * + *

This method always returns the latest revision. In order to retrieve a previous revision of + * the assignment, also provide the revision ID in the `name` parameter. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetOSPolicyAssignmentRequest request =
+   *       GetOSPolicyAssignmentRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.getOSPolicyAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   OSPolicyAssignment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getOSPolicyAssignmentCallable() { + return stub.getOSPolicyAssignmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignments under the parent resource. + * + *

For each OS policy assignment, the latest revision is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (OSPolicyAssignment element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentsPagedResponse listOSPolicyAssignments(LocationName parent) { + ListOSPolicyAssignmentsRequest request = + ListOSPolicyAssignmentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listOSPolicyAssignments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignments under the parent resource. + * + *

For each OS policy assignment, the latest revision is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (OSPolicyAssignment element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentsPagedResponse listOSPolicyAssignments(String parent) { + ListOSPolicyAssignmentsRequest request = + ListOSPolicyAssignmentsRequest.newBuilder().setParent(parent).build(); + return listOSPolicyAssignments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignments under the parent resource. + * + *

For each OS policy assignment, the latest revision is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentsRequest request =
+   *       ListOSPolicyAssignmentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (OSPolicyAssignment element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentsPagedResponse listOSPolicyAssignments( + ListOSPolicyAssignmentsRequest request) { + return listOSPolicyAssignmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignments under the parent resource. + * + *

For each OS policy assignment, the latest revision is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentsRequest request =
+   *       ListOSPolicyAssignmentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (OSPolicyAssignment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOSPolicyAssignmentsPagedCallable() { + return stub.listOSPolicyAssignmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignments under the parent resource. + * + *

For each OS policy assignment, the latest revision is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentsRequest request =
+   *       ListOSPolicyAssignmentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListOSPolicyAssignmentsResponse response =
+   *         osConfigZonalServiceClient.listOSPolicyAssignmentsCallable().call(request);
+   *     for (OSPolicyAssignment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listOSPolicyAssignmentsCallable() { + return stub.listOSPolicyAssignmentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   OSPolicyAssignmentName name =
+   *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
+   *   for (OSPolicyAssignment element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentRevisions(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the OS policy assignment to list revisions for. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentRevisionsPagedResponse listOSPolicyAssignmentRevisions( + OSPolicyAssignmentName name) { + ListOSPolicyAssignmentRevisionsRequest request = + ListOSPolicyAssignmentRevisionsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return listOSPolicyAssignmentRevisions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name =
+   *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]").toString();
+   *   for (OSPolicyAssignment element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentRevisions(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the OS policy assignment to list revisions for. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentRevisionsPagedResponse listOSPolicyAssignmentRevisions( + String name) { + ListOSPolicyAssignmentRevisionsRequest request = + ListOSPolicyAssignmentRevisionsRequest.newBuilder().setName(name).build(); + return listOSPolicyAssignmentRevisions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentRevisionsRequest request =
+   *       ListOSPolicyAssignmentRevisionsRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (OSPolicyAssignment element :
+   *       osConfigZonalServiceClient.listOSPolicyAssignmentRevisions(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOSPolicyAssignmentRevisionsPagedResponse listOSPolicyAssignmentRevisions( + ListOSPolicyAssignmentRevisionsRequest request) { + return listOSPolicyAssignmentRevisionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentRevisionsRequest request =
+   *       ListOSPolicyAssignmentRevisionsRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient
+   *           .listOSPolicyAssignmentRevisionsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (OSPolicyAssignment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsPagedCallable() { + return stub.listOSPolicyAssignmentRevisionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListOSPolicyAssignmentRevisionsRequest request =
+   *       ListOSPolicyAssignmentRevisionsRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListOSPolicyAssignmentRevisionsResponse response =
+   *         osConfigZonalServiceClient.listOSPolicyAssignmentRevisionsCallable().call(request);
+   *     for (OSPolicyAssignment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisionsCallable() { + return stub.listOSPolicyAssignmentRevisionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

If the LRO completes and is not cancelled, all revisions associated with the OS policy + * assignment are deleted. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   OSPolicyAssignmentName name =
+   *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
+   *   osConfigZonalServiceClient.deleteOSPolicyAssignmentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the OS policy assignment to be deleted + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteOSPolicyAssignmentAsync(OSPolicyAssignmentName name) { + DeleteOSPolicyAssignmentRequest request = + DeleteOSPolicyAssignmentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteOSPolicyAssignmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

If the LRO completes and is not cancelled, all revisions associated with the OS policy + * assignment are deleted. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name =
+   *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]").toString();
+   *   osConfigZonalServiceClient.deleteOSPolicyAssignmentAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the OS policy assignment to be deleted + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteOSPolicyAssignmentAsync(String name) { + DeleteOSPolicyAssignmentRequest request = + DeleteOSPolicyAssignmentRequest.newBuilder().setName(name).build(); + return deleteOSPolicyAssignmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

If the LRO completes and is not cancelled, all revisions associated with the OS policy + * assignment are deleted. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   DeleteOSPolicyAssignmentRequest request =
+   *       DeleteOSPolicyAssignmentRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   osConfigZonalServiceClient.deleteOSPolicyAssignmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest request) { + return deleteOSPolicyAssignmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

If the LRO completes and is not cancelled, all revisions associated with the OS policy + * assignment are deleted. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   DeleteOSPolicyAssignmentRequest request =
+   *       DeleteOSPolicyAssignmentRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       osConfigZonalServiceClient
+   *           .deleteOSPolicyAssignmentOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationCallable() { + return stub.deleteOSPolicyAssignmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the OS policy assignment. + * + *

This method creates a new revision of the OS policy assignment. + * + *

This method returns a long running operation (LRO) that contains the rollout details. The + * rollout can be cancelled by cancelling the LRO. + * + *

If the LRO completes and is not cancelled, all revisions associated with the OS policy + * assignment are deleted. + * + *

For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   DeleteOSPolicyAssignmentRequest request =
+   *       DeleteOSPolicyAssignmentRequest.newBuilder()
+   *           .setName(
+   *               OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.deleteOSPolicyAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteOSPolicyAssignmentCallable() { + return stub.deleteOSPolicyAssignmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get OS policies compliance data for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   InstanceOSPoliciesComplianceName name =
+   *       InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   InstanceOSPoliciesCompliance response =
+   *       osConfigZonalServiceClient.getInstanceOSPoliciesCompliance(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for instance OS policies compliance resource. + *

Format: + * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + *

For `{project}`, either Compute Engine project-number or project-id can be provided. For + * `{instance}`, either Compute Engine VM instance-id or instance-name can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( + InstanceOSPoliciesComplianceName name) { + GetInstanceOSPoliciesComplianceRequest request = + GetInstanceOSPoliciesComplianceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInstanceOSPoliciesCompliance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get OS policies compliance data for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name =
+   *       InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   InstanceOSPoliciesCompliance response =
+   *       osConfigZonalServiceClient.getInstanceOSPoliciesCompliance(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for instance OS policies compliance resource. + *

Format: + * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + *

For `{project}`, either Compute Engine project-number or project-id can be provided. For + * `{instance}`, either Compute Engine VM instance-id or instance-name can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance(String name) { + GetInstanceOSPoliciesComplianceRequest request = + GetInstanceOSPoliciesComplianceRequest.newBuilder().setName(name).build(); + return getInstanceOSPoliciesCompliance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get OS policies compliance data for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetInstanceOSPoliciesComplianceRequest request =
+   *       GetInstanceOSPoliciesComplianceRequest.newBuilder()
+   *           .setName(
+   *               InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]")
+   *                   .toString())
+   *           .build();
+   *   InstanceOSPoliciesCompliance response =
+   *       osConfigZonalServiceClient.getInstanceOSPoliciesCompliance(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 InstanceOSPoliciesCompliance getInstanceOSPoliciesCompliance( + GetInstanceOSPoliciesComplianceRequest request) { + return getInstanceOSPoliciesComplianceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get OS policies compliance data for the specified Compute Engine VM instance. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetInstanceOSPoliciesComplianceRequest request =
+   *       GetInstanceOSPoliciesComplianceRequest.newBuilder()
+   *           .setName(
+   *               InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.getInstanceOSPoliciesComplianceCallable().futureCall(request);
+   *   // Do something.
+   *   InstanceOSPoliciesCompliance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getInstanceOSPoliciesComplianceCallable() { + return stub.getInstanceOSPoliciesComplianceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policies compliance data for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (InstanceOSPoliciesCompliance element :
+   *       osConfigZonalServiceClient.listInstanceOSPoliciesCompliances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: `projects/{project}/locations/{location}` + *

For `{project}`, either Compute Engine project-number or project-id can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPoliciesCompliances( + LocationName parent) { + ListInstanceOSPoliciesCompliancesRequest request = + ListInstanceOSPoliciesCompliancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstanceOSPoliciesCompliances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policies compliance data for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (InstanceOSPoliciesCompliance element :
+   *       osConfigZonalServiceClient.listInstanceOSPoliciesCompliances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: `projects/{project}/locations/{location}` + *

For `{project}`, either Compute Engine project-number or project-id can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPoliciesCompliances( + String parent) { + ListInstanceOSPoliciesCompliancesRequest request = + ListInstanceOSPoliciesCompliancesRequest.newBuilder().setParent(parent).build(); + return listInstanceOSPoliciesCompliances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policies compliance data for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListInstanceOSPoliciesCompliancesRequest request =
+   *       ListInstanceOSPoliciesCompliancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (InstanceOSPoliciesCompliance element :
+   *       osConfigZonalServiceClient.listInstanceOSPoliciesCompliances(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstanceOSPoliciesCompliancesPagedResponse listInstanceOSPoliciesCompliances( + ListInstanceOSPoliciesCompliancesRequest request) { + return listInstanceOSPoliciesCompliancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policies compliance data for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListInstanceOSPoliciesCompliancesRequest request =
+   *       ListInstanceOSPoliciesCompliancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient
+   *           .listInstanceOSPoliciesCompliancesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (InstanceOSPoliciesCompliance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesPagedCallable() { + return stub.listInstanceOSPoliciesCompliancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List OS policies compliance data for all Compute Engine VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListInstanceOSPoliciesCompliancesRequest request =
+   *       ListInstanceOSPoliciesCompliancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListInstanceOSPoliciesCompliancesResponse response =
+   *         osConfigZonalServiceClient.listInstanceOSPoliciesCompliancesCallable().call(request);
+   *     for (InstanceOSPoliciesCompliance element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliancesCallable() { + return stub.listInstanceOSPoliciesCompliancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get inventory data for the specified VM instance. If the VM has no associated inventory, the + * message `NOT_FOUND` is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   InventoryName name = InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Inventory response = osConfigZonalServiceClient.getInventory(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for inventory resource. + *

Format: `projects/{project}/locations/{location}/instances/{instance}/inventory` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Inventory getInventory(InventoryName name) { + GetInventoryRequest request = + GetInventoryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInventory(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get inventory data for the specified VM instance. If the VM has no associated inventory, the + * message `NOT_FOUND` is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name = InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Inventory response = osConfigZonalServiceClient.getInventory(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for inventory resource. + *

Format: `projects/{project}/locations/{location}/instances/{instance}/inventory` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Inventory getInventory(String name) { + GetInventoryRequest request = GetInventoryRequest.newBuilder().setName(name).build(); + return getInventory(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get inventory data for the specified VM instance. If the VM has no associated inventory, the + * message `NOT_FOUND` is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetInventoryRequest request =
+   *       GetInventoryRequest.newBuilder()
+   *           .setName(InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setView(InventoryView.forNumber(0))
+   *           .build();
+   *   Inventory response = osConfigZonalServiceClient.getInventory(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 Inventory getInventory(GetInventoryRequest request) { + return getInventoryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get inventory data for the specified VM instance. If the VM has no associated inventory, the + * message `NOT_FOUND` is returned. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetInventoryRequest request =
+   *       GetInventoryRequest.newBuilder()
+   *           .setName(InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setView(InventoryView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.getInventoryCallable().futureCall(request);
+   *   // Do something.
+   *   Inventory response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInventoryCallable() { + return stub.getInventoryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List inventory data for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   for (Inventory element : osConfigZonalServiceClient.listInventories(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: `projects/{project}/locations/{location}/instances/{instance}` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, only hyphen or dash character is supported to list inventories across VMs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInventoriesPagedResponse listInventories(InstanceName parent) { + ListInventoriesRequest request = + ListInventoriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInventories(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List inventory data for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   for (Inventory element : osConfigZonalServiceClient.listInventories(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: `projects/{project}/locations/{location}/instances/{instance}` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, only hyphen or dash character is supported to list inventories across VMs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInventoriesPagedResponse listInventories(String parent) { + ListInventoriesRequest request = ListInventoriesRequest.newBuilder().setParent(parent).build(); + return listInventories(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List inventory data for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListInventoriesRequest request =
+   *       ListInventoriesRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setView(InventoryView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Inventory element : osConfigZonalServiceClient.listInventories(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInventoriesPagedResponse listInventories(ListInventoriesRequest request) { + return listInventoriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List inventory data for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListInventoriesRequest request =
+   *       ListInventoriesRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setView(InventoryView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.listInventoriesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Inventory element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInventoriesPagedCallable() { + return stub.listInventoriesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List inventory data for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListInventoriesRequest request =
+   *       ListInventoriesRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setView(InventoryView.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListInventoriesResponse response =
+   *         osConfigZonalServiceClient.listInventoriesCallable().call(request);
+   *     for (Inventory element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInventoriesCallable() { + return stub.listInventoriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have + * vulnerability reports associated with them. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   VulnerabilityReportName name =
+   *       VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   VulnerabilityReport response = osConfigZonalServiceClient.getVulnerabilityReport(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for vulnerability resource. + *

Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VulnerabilityReport getVulnerabilityReport(VulnerabilityReportName name) { + GetVulnerabilityReportRequest request = + GetVulnerabilityReportRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getVulnerabilityReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have + * vulnerability reports associated with them. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String name = VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   VulnerabilityReport response = osConfigZonalServiceClient.getVulnerabilityReport(name);
+   * }
+   * }
+ * + * @param name Required. API resource name for vulnerability resource. + *

Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VulnerabilityReport getVulnerabilityReport(String name) { + GetVulnerabilityReportRequest request = + GetVulnerabilityReportRequest.newBuilder().setName(name).build(); + return getVulnerabilityReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have + * vulnerability reports associated with them. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetVulnerabilityReportRequest request =
+   *       GetVulnerabilityReportRequest.newBuilder()
+   *           .setName(
+   *               VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   VulnerabilityReport response = osConfigZonalServiceClient.getVulnerabilityReport(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 VulnerabilityReport getVulnerabilityReport(GetVulnerabilityReportRequest request) { + return getVulnerabilityReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have + * vulnerability reports associated with them. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   GetVulnerabilityReportRequest request =
+   *       GetVulnerabilityReportRequest.newBuilder()
+   *           .setName(
+   *               VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.getVulnerabilityReportCallable().futureCall(request);
+   *   // Do something.
+   *   VulnerabilityReport response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getVulnerabilityReportCallable() { + return stub.getVulnerabilityReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List vulnerability reports for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   for (VulnerabilityReport element :
+   *       osConfigZonalServiceClient.listVulnerabilityReports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: `projects/{project}/locations/{location}/instances/{instance}` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, only `-` character is supported to list vulnerability reports across VMs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports(InstanceName parent) { + ListVulnerabilityReportsRequest request = + ListVulnerabilityReportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listVulnerabilityReports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List vulnerability reports for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   for (VulnerabilityReport element :
+   *       osConfigZonalServiceClient.listVulnerabilityReports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. + *

Format: `projects/{project}/locations/{location}/instances/{instance}` + *

For `{project}`, either `project-number` or `project-id` can be provided. For + * `{instance}`, only `-` character is supported to list vulnerability reports across VMs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports(String parent) { + ListVulnerabilityReportsRequest request = + ListVulnerabilityReportsRequest.newBuilder().setParent(parent).build(); + return listVulnerabilityReports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List vulnerability reports for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListVulnerabilityReportsRequest request =
+   *       ListVulnerabilityReportsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (VulnerabilityReport element :
+   *       osConfigZonalServiceClient.listVulnerabilityReports(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListVulnerabilityReportsPagedResponse listVulnerabilityReports( + ListVulnerabilityReportsRequest request) { + return listVulnerabilityReportsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List vulnerability reports for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListVulnerabilityReportsRequest request =
+   *       ListVulnerabilityReportsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigZonalServiceClient.listVulnerabilityReportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (VulnerabilityReport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listVulnerabilityReportsPagedCallable() { + return stub.listVulnerabilityReportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List vulnerability reports for all VM instances in the specified zone. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+   *     OsConfigZonalServiceClient.create()) {
+   *   ListVulnerabilityReportsRequest request =
+   *       ListVulnerabilityReportsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListVulnerabilityReportsResponse response =
+   *         osConfigZonalServiceClient.listVulnerabilityReportsCallable().call(request);
+   *     for (VulnerabilityReport element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listVulnerabilityReportsCallable() { + return stub.listVulnerabilityReportsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListOSPolicyAssignmentsPagedResponse + extends AbstractPagedListResponse< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + OSPolicyAssignment, + ListOSPolicyAssignmentsPage, + ListOSPolicyAssignmentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListOSPolicyAssignmentsRequest, ListOSPolicyAssignmentsResponse, OSPolicyAssignment> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOSPolicyAssignmentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListOSPolicyAssignmentsPagedResponse apply(ListOSPolicyAssignmentsPage input) { + return new ListOSPolicyAssignmentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListOSPolicyAssignmentsPagedResponse(ListOSPolicyAssignmentsPage page) { + super(page, ListOSPolicyAssignmentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOSPolicyAssignmentsPage + extends AbstractPage< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + OSPolicyAssignment, + ListOSPolicyAssignmentsPage> { + + private ListOSPolicyAssignmentsPage( + PageContext< + ListOSPolicyAssignmentsRequest, ListOSPolicyAssignmentsResponse, OSPolicyAssignment> + context, + ListOSPolicyAssignmentsResponse response) { + super(context, response); + } + + private static ListOSPolicyAssignmentsPage createEmptyPage() { + return new ListOSPolicyAssignmentsPage(null, null); + } + + @Override + protected ListOSPolicyAssignmentsPage createPage( + PageContext< + ListOSPolicyAssignmentsRequest, ListOSPolicyAssignmentsResponse, OSPolicyAssignment> + context, + ListOSPolicyAssignmentsResponse response) { + return new ListOSPolicyAssignmentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListOSPolicyAssignmentsRequest, ListOSPolicyAssignmentsResponse, OSPolicyAssignment> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOSPolicyAssignmentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + OSPolicyAssignment, + ListOSPolicyAssignmentsPage, + ListOSPolicyAssignmentsFixedSizeCollection> { + + private ListOSPolicyAssignmentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOSPolicyAssignmentsFixedSizeCollection createEmptyCollection() { + return new ListOSPolicyAssignmentsFixedSizeCollection(null, 0); + } + + @Override + protected ListOSPolicyAssignmentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOSPolicyAssignmentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListOSPolicyAssignmentRevisionsPagedResponse + extends AbstractPagedListResponse< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment, + ListOSPolicyAssignmentRevisionsPage, + ListOSPolicyAssignmentRevisionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOSPolicyAssignmentRevisionsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListOSPolicyAssignmentRevisionsPage, ListOSPolicyAssignmentRevisionsPagedResponse>() { + @Override + public ListOSPolicyAssignmentRevisionsPagedResponse apply( + ListOSPolicyAssignmentRevisionsPage input) { + return new ListOSPolicyAssignmentRevisionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListOSPolicyAssignmentRevisionsPagedResponse(ListOSPolicyAssignmentRevisionsPage page) { + super(page, ListOSPolicyAssignmentRevisionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOSPolicyAssignmentRevisionsPage + extends AbstractPage< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment, + ListOSPolicyAssignmentRevisionsPage> { + + private ListOSPolicyAssignmentRevisionsPage( + PageContext< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment> + context, + ListOSPolicyAssignmentRevisionsResponse response) { + super(context, response); + } + + private static ListOSPolicyAssignmentRevisionsPage createEmptyPage() { + return new ListOSPolicyAssignmentRevisionsPage(null, null); + } + + @Override + protected ListOSPolicyAssignmentRevisionsPage createPage( + PageContext< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment> + context, + ListOSPolicyAssignmentRevisionsResponse response) { + return new ListOSPolicyAssignmentRevisionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOSPolicyAssignmentRevisionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment, + ListOSPolicyAssignmentRevisionsPage, + ListOSPolicyAssignmentRevisionsFixedSizeCollection> { + + private ListOSPolicyAssignmentRevisionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOSPolicyAssignmentRevisionsFixedSizeCollection createEmptyCollection() { + return new ListOSPolicyAssignmentRevisionsFixedSizeCollection(null, 0); + } + + @Override + protected ListOSPolicyAssignmentRevisionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOSPolicyAssignmentRevisionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstanceOSPoliciesCompliancesPagedResponse + extends AbstractPagedListResponse< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance, + ListInstanceOSPoliciesCompliancesPage, + ListInstanceOSPoliciesCompliancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstanceOSPoliciesCompliancesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListInstanceOSPoliciesCompliancesPage, + ListInstanceOSPoliciesCompliancesPagedResponse>() { + @Override + public ListInstanceOSPoliciesCompliancesPagedResponse apply( + ListInstanceOSPoliciesCompliancesPage input) { + return new ListInstanceOSPoliciesCompliancesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListInstanceOSPoliciesCompliancesPagedResponse( + ListInstanceOSPoliciesCompliancesPage page) { + super(page, ListInstanceOSPoliciesCompliancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstanceOSPoliciesCompliancesPage + extends AbstractPage< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance, + ListInstanceOSPoliciesCompliancesPage> { + + private ListInstanceOSPoliciesCompliancesPage( + PageContext< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance> + context, + ListInstanceOSPoliciesCompliancesResponse response) { + super(context, response); + } + + private static ListInstanceOSPoliciesCompliancesPage createEmptyPage() { + return new ListInstanceOSPoliciesCompliancesPage(null, null); + } + + @Override + protected ListInstanceOSPoliciesCompliancesPage createPage( + PageContext< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance> + context, + ListInstanceOSPoliciesCompliancesResponse response) { + return new ListInstanceOSPoliciesCompliancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstanceOSPoliciesCompliancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance, + ListInstanceOSPoliciesCompliancesPage, + ListInstanceOSPoliciesCompliancesFixedSizeCollection> { + + private ListInstanceOSPoliciesCompliancesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstanceOSPoliciesCompliancesFixedSizeCollection createEmptyCollection() { + return new ListInstanceOSPoliciesCompliancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstanceOSPoliciesCompliancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstanceOSPoliciesCompliancesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInventoriesPagedResponse + extends AbstractPagedListResponse< + ListInventoriesRequest, + ListInventoriesResponse, + Inventory, + ListInventoriesPage, + ListInventoriesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInventoriesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListInventoriesPagedResponse apply(ListInventoriesPage input) { + return new ListInventoriesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListInventoriesPagedResponse(ListInventoriesPage page) { + super(page, ListInventoriesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInventoriesPage + extends AbstractPage< + ListInventoriesRequest, ListInventoriesResponse, Inventory, ListInventoriesPage> { + + private ListInventoriesPage( + PageContext context, + ListInventoriesResponse response) { + super(context, response); + } + + private static ListInventoriesPage createEmptyPage() { + return new ListInventoriesPage(null, null); + } + + @Override + protected ListInventoriesPage createPage( + PageContext context, + ListInventoriesResponse response) { + return new ListInventoriesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInventoriesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInventoriesRequest, + ListInventoriesResponse, + Inventory, + ListInventoriesPage, + ListInventoriesFixedSizeCollection> { + + private ListInventoriesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInventoriesFixedSizeCollection createEmptyCollection() { + return new ListInventoriesFixedSizeCollection(null, 0); + } + + @Override + protected ListInventoriesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInventoriesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListVulnerabilityReportsPagedResponse + extends AbstractPagedListResponse< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport, + ListVulnerabilityReportsPage, + ListVulnerabilityReportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListVulnerabilityReportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListVulnerabilityReportsPagedResponse apply(ListVulnerabilityReportsPage input) { + return new ListVulnerabilityReportsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListVulnerabilityReportsPagedResponse(ListVulnerabilityReportsPage page) { + super(page, ListVulnerabilityReportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListVulnerabilityReportsPage + extends AbstractPage< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport, + ListVulnerabilityReportsPage> { + + private ListVulnerabilityReportsPage( + PageContext< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport> + context, + ListVulnerabilityReportsResponse response) { + super(context, response); + } + + private static ListVulnerabilityReportsPage createEmptyPage() { + return new ListVulnerabilityReportsPage(null, null); + } + + @Override + protected ListVulnerabilityReportsPage createPage( + PageContext< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport> + context, + ListVulnerabilityReportsResponse response) { + return new ListVulnerabilityReportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListVulnerabilityReportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport, + ListVulnerabilityReportsPage, + ListVulnerabilityReportsFixedSizeCollection> { + + private ListVulnerabilityReportsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListVulnerabilityReportsFixedSizeCollection createEmptyCollection() { + return new ListVulnerabilityReportsFixedSizeCollection(null, 0); + } + + @Override + protected ListVulnerabilityReportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListVulnerabilityReportsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java new file mode 100644 index 00000000..1d204bc7 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java @@ -0,0 +1,410 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.osconfig.v1alpha.stub.OsConfigZonalServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link OsConfigZonalServiceClient}. + * + *

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 getOSPolicyAssignment to 30 seconds: + * + *

{@code
+ * OsConfigZonalServiceSettings.Builder osConfigZonalServiceSettingsBuilder =
+ *     OsConfigZonalServiceSettings.newBuilder();
+ * osConfigZonalServiceSettingsBuilder
+ *     .getOSPolicyAssignmentSettings()
+ *     .setRetrySettings(
+ *         osConfigZonalServiceSettingsBuilder
+ *             .getOSPolicyAssignmentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * OsConfigZonalServiceSettings osConfigZonalServiceSettings =
+ *     osConfigZonalServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class OsConfigZonalServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createOSPolicyAssignment. */ + public UnaryCallSettings + createOSPolicyAssignmentSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .createOSPolicyAssignmentSettings(); + } + + /** Returns the object with the settings used for calls to createOSPolicyAssignment. */ + public OperationCallSettings< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .createOSPolicyAssignmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateOSPolicyAssignment. */ + public UnaryCallSettings + updateOSPolicyAssignmentSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .updateOSPolicyAssignmentSettings(); + } + + /** Returns the object with the settings used for calls to updateOSPolicyAssignment. */ + public OperationCallSettings< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .updateOSPolicyAssignmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to getOSPolicyAssignment. */ + public UnaryCallSettings + getOSPolicyAssignmentSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()).getOSPolicyAssignmentSettings(); + } + + /** Returns the object with the settings used for calls to listOSPolicyAssignments. */ + public PagedCallSettings< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + listOSPolicyAssignmentsSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()).listOSPolicyAssignmentsSettings(); + } + + /** Returns the object with the settings used for calls to listOSPolicyAssignmentRevisions. */ + public PagedCallSettings< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .listOSPolicyAssignmentRevisionsSettings(); + } + + /** Returns the object with the settings used for calls to deleteOSPolicyAssignment. */ + public UnaryCallSettings + deleteOSPolicyAssignmentSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .deleteOSPolicyAssignmentSettings(); + } + + /** Returns the object with the settings used for calls to deleteOSPolicyAssignment. */ + public OperationCallSettings< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .deleteOSPolicyAssignmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to getInstanceOSPoliciesCompliance. */ + public UnaryCallSettings + getInstanceOSPoliciesComplianceSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .getInstanceOSPoliciesComplianceSettings(); + } + + /** Returns the object with the settings used for calls to listInstanceOSPoliciesCompliances. */ + public PagedCallSettings< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .listInstanceOSPoliciesCompliancesSettings(); + } + + /** Returns the object with the settings used for calls to getInventory. */ + public UnaryCallSettings getInventorySettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()).getInventorySettings(); + } + + /** Returns the object with the settings used for calls to listInventories. */ + public PagedCallSettings< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + listInventoriesSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()).listInventoriesSettings(); + } + + /** Returns the object with the settings used for calls to getVulnerabilityReport. */ + public UnaryCallSettings + getVulnerabilityReportSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()).getVulnerabilityReportSettings(); + } + + /** Returns the object with the settings used for calls to listVulnerabilityReports. */ + public PagedCallSettings< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsSettings() { + return ((OsConfigZonalServiceStubSettings) getStubSettings()) + .listVulnerabilityReportsSettings(); + } + + public static final OsConfigZonalServiceSettings create(OsConfigZonalServiceStubSettings stub) + throws IOException { + return new OsConfigZonalServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return OsConfigZonalServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return OsConfigZonalServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return OsConfigZonalServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return OsConfigZonalServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return OsConfigZonalServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return OsConfigZonalServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return OsConfigZonalServiceStubSettings.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 OsConfigZonalServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for OsConfigZonalServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(OsConfigZonalServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(OsConfigZonalServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(OsConfigZonalServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(OsConfigZonalServiceStubSettings.newBuilder()); + } + + public OsConfigZonalServiceStubSettings.Builder getStubSettingsBuilder() { + return ((OsConfigZonalServiceStubSettings.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 createOSPolicyAssignment. */ + public UnaryCallSettings.Builder + createOSPolicyAssignmentSettings() { + return getStubSettingsBuilder().createOSPolicyAssignmentSettings(); + } + + /** Returns the builder for the settings used for calls to createOSPolicyAssignment. */ + public OperationCallSettings.Builder< + CreateOSPolicyAssignmentRequest, + OSPolicyAssignment, + OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationSettings() { + return getStubSettingsBuilder().createOSPolicyAssignmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateOSPolicyAssignment. */ + public UnaryCallSettings.Builder + updateOSPolicyAssignmentSettings() { + return getStubSettingsBuilder().updateOSPolicyAssignmentSettings(); + } + + /** Returns the builder for the settings used for calls to updateOSPolicyAssignment. */ + public OperationCallSettings.Builder< + UpdateOSPolicyAssignmentRequest, + OSPolicyAssignment, + OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationSettings() { + return getStubSettingsBuilder().updateOSPolicyAssignmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getOSPolicyAssignment. */ + public UnaryCallSettings.Builder + getOSPolicyAssignmentSettings() { + return getStubSettingsBuilder().getOSPolicyAssignmentSettings(); + } + + /** Returns the builder for the settings used for calls to listOSPolicyAssignments. */ + public PagedCallSettings.Builder< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + listOSPolicyAssignmentsSettings() { + return getStubSettingsBuilder().listOSPolicyAssignmentsSettings(); + } + + /** Returns the builder for the settings used for calls to listOSPolicyAssignmentRevisions. */ + public PagedCallSettings.Builder< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsSettings() { + return getStubSettingsBuilder().listOSPolicyAssignmentRevisionsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOSPolicyAssignment. */ + public UnaryCallSettings.Builder + deleteOSPolicyAssignmentSettings() { + return getStubSettingsBuilder().deleteOSPolicyAssignmentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteOSPolicyAssignment. */ + public OperationCallSettings.Builder< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationSettings() { + return getStubSettingsBuilder().deleteOSPolicyAssignmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getInstanceOSPoliciesCompliance. */ + public UnaryCallSettings.Builder< + GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> + getInstanceOSPoliciesComplianceSettings() { + return getStubSettingsBuilder().getInstanceOSPoliciesComplianceSettings(); + } + + /** Returns the builder for the settings used for calls to listInstanceOSPoliciesCompliances. */ + public PagedCallSettings.Builder< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesSettings() { + return getStubSettingsBuilder().listInstanceOSPoliciesCompliancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInventory. */ + public UnaryCallSettings.Builder getInventorySettings() { + return getStubSettingsBuilder().getInventorySettings(); + } + + /** Returns the builder for the settings used for calls to listInventories. */ + public PagedCallSettings.Builder< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + listInventoriesSettings() { + return getStubSettingsBuilder().listInventoriesSettings(); + } + + /** Returns the builder for the settings used for calls to getVulnerabilityReport. */ + public UnaryCallSettings.Builder + getVulnerabilityReportSettings() { + return getStubSettingsBuilder().getVulnerabilityReportSettings(); + } + + /** Returns the builder for the settings used for calls to listVulnerabilityReports. */ + public PagedCallSettings.Builder< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsSettings() { + return getStubSettingsBuilder().listVulnerabilityReportsSettings(); + } + + @Override + public OsConfigZonalServiceSettings build() throws IOException { + return new OsConfigZonalServiceSettings(this); + } + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json new file mode 100644 index 00000000..558ddc10 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/gapic_metadata.json @@ -0,0 +1,54 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.osconfig.v1alpha", + "libraryPackage": "com.google.cloud.osconfig.v1alpha", + "services": { + "OsConfigZonalService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigZonalServiceClient", + "rpcs": { + "CreateOSPolicyAssignment": { + "methods": ["createOSPolicyAssignmentAsync", "createOSPolicyAssignmentAsync", "createOSPolicyAssignmentAsync", "createOSPolicyAssignmentOperationCallable", "createOSPolicyAssignmentCallable"] + }, + "DeleteOSPolicyAssignment": { + "methods": ["deleteOSPolicyAssignmentAsync", "deleteOSPolicyAssignmentAsync", "deleteOSPolicyAssignmentAsync", "deleteOSPolicyAssignmentOperationCallable", "deleteOSPolicyAssignmentCallable"] + }, + "GetInstanceOSPoliciesCompliance": { + "methods": ["getInstanceOSPoliciesCompliance", "getInstanceOSPoliciesCompliance", "getInstanceOSPoliciesCompliance", "getInstanceOSPoliciesComplianceCallable"] + }, + "GetInventory": { + "methods": ["getInventory", "getInventory", "getInventory", "getInventoryCallable"] + }, + "GetOSPolicyAssignment": { + "methods": ["getOSPolicyAssignment", "getOSPolicyAssignment", "getOSPolicyAssignment", "getOSPolicyAssignmentCallable"] + }, + "GetVulnerabilityReport": { + "methods": ["getVulnerabilityReport", "getVulnerabilityReport", "getVulnerabilityReport", "getVulnerabilityReportCallable"] + }, + "ListInstanceOSPoliciesCompliances": { + "methods": ["listInstanceOSPoliciesCompliances", "listInstanceOSPoliciesCompliances", "listInstanceOSPoliciesCompliances", "listInstanceOSPoliciesCompliancesPagedCallable", "listInstanceOSPoliciesCompliancesCallable"] + }, + "ListInventories": { + "methods": ["listInventories", "listInventories", "listInventories", "listInventoriesPagedCallable", "listInventoriesCallable"] + }, + "ListOSPolicyAssignmentRevisions": { + "methods": ["listOSPolicyAssignmentRevisions", "listOSPolicyAssignmentRevisions", "listOSPolicyAssignmentRevisions", "listOSPolicyAssignmentRevisionsPagedCallable", "listOSPolicyAssignmentRevisionsCallable"] + }, + "ListOSPolicyAssignments": { + "methods": ["listOSPolicyAssignments", "listOSPolicyAssignments", "listOSPolicyAssignments", "listOSPolicyAssignmentsPagedCallable", "listOSPolicyAssignmentsCallable"] + }, + "ListVulnerabilityReports": { + "methods": ["listVulnerabilityReports", "listVulnerabilityReports", "listVulnerabilityReports", "listVulnerabilityReportsPagedCallable", "listVulnerabilityReportsCallable"] + }, + "UpdateOSPolicyAssignment": { + "methods": ["updateOSPolicyAssignmentAsync", "updateOSPolicyAssignmentAsync", "updateOSPolicyAssignmentOperationCallable", "updateOSPolicyAssignmentCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java new file mode 100644 index 00000000..c58a50c3 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= OsConfigZonalServiceClient ======================= + * + *

Service Description: Zonal OS Config API + * + *

The OS Config service is the server-side component that allows users to manage package + * installations and patch jobs for Compute Engine VM instances. + * + *

Sample for OsConfigZonalServiceClient: + * + *

{@code
+ * try (OsConfigZonalServiceClient osConfigZonalServiceClient =
+ *     OsConfigZonalServiceClient.create()) {
+ *   OSPolicyAssignmentName name =
+ *       OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
+ *   OSPolicyAssignment response = osConfigZonalServiceClient.getOSPolicyAssignment(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.osconfig.v1alpha; + +import javax.annotation.Generated; diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceCallableFactory.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceCallableFactory.java new file mode 100644 index 00000000..52195918 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the OsConfigZonalService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcOsConfigZonalServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java new file mode 100644 index 00000000..6912aff2 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java @@ -0,0 +1,765 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha.stub; + +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; +import com.google.cloud.osconfig.v1alpha.GetInventoryRequest; +import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; +import com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; +import com.google.cloud.osconfig.v1alpha.Inventory; +import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; +import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; +import com.google.cloud.osconfig.v1alpha.ListInventoriesRequest; +import com.google.cloud.osconfig.v1alpha.ListInventoriesResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; +import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; +import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignment; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; +import com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.VulnerabilityReport; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the OsConfigZonalService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcOsConfigZonalServiceStub extends OsConfigZonalServiceStub { + private static final MethodDescriptor + createOSPolicyAssignmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/CreateOSPolicyAssignment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateOSPolicyAssignmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateOSPolicyAssignmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/UpdateOSPolicyAssignment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateOSPolicyAssignmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getOSPolicyAssignmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/GetOSPolicyAssignment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetOSPolicyAssignmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(OSPolicyAssignment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListOSPolicyAssignmentsRequest, ListOSPolicyAssignmentsResponse> + listOSPolicyAssignmentsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/ListOSPolicyAssignments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListOSPolicyAssignmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListOSPolicyAssignmentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisionsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/ListOSPolicyAssignmentRevisions") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListOSPolicyAssignmentRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListOSPolicyAssignmentRevisionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteOSPolicyAssignmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/DeleteOSPolicyAssignment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteOSPolicyAssignmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> + getInstanceOSPoliciesComplianceMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/GetInstanceOSPoliciesCompliance") + .setRequestMarshaller( + ProtoUtils.marshaller( + GetInstanceOSPoliciesComplianceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(InstanceOSPoliciesCompliance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliancesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/ListInstanceOSPoliciesCompliances") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListInstanceOSPoliciesCompliancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListInstanceOSPoliciesCompliancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getInventoryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1alpha.OsConfigZonalService/GetInventory") + .setRequestMarshaller(ProtoUtils.marshaller(GetInventoryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Inventory.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInventoriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/ListInventories") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInventoriesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInventoriesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getVulnerabilityReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/GetVulnerabilityReport") + .setRequestMarshaller( + ProtoUtils.marshaller(GetVulnerabilityReportRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(VulnerabilityReport.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListVulnerabilityReportsRequest, ListVulnerabilityReportsResponse> + listVulnerabilityReportsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1alpha.OsConfigZonalService/ListVulnerabilityReports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListVulnerabilityReportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListVulnerabilityReportsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + createOSPolicyAssignmentCallable; + private final OperationCallable< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationCallable; + private final UnaryCallable + updateOSPolicyAssignmentCallable; + private final OperationCallable< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationCallable; + private final UnaryCallable + getOSPolicyAssignmentCallable; + private final UnaryCallable + listOSPolicyAssignmentsCallable; + private final UnaryCallable + listOSPolicyAssignmentsPagedCallable; + private final UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisionsCallable; + private final UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsPagedCallable; + private final UnaryCallable + deleteOSPolicyAssignmentCallable; + private final OperationCallable< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationCallable; + private final UnaryCallable + getInstanceOSPoliciesComplianceCallable; + private final UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliancesCallable; + private final UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesPagedCallable; + private final UnaryCallable getInventoryCallable; + private final UnaryCallable + listInventoriesCallable; + private final UnaryCallable + listInventoriesPagedCallable; + private final UnaryCallable + getVulnerabilityReportCallable; + private final UnaryCallable + listVulnerabilityReportsCallable; + private final UnaryCallable< + ListVulnerabilityReportsRequest, ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcOsConfigZonalServiceStub create(OsConfigZonalServiceStubSettings settings) + throws IOException { + return new GrpcOsConfigZonalServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcOsConfigZonalServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcOsConfigZonalServiceStub( + OsConfigZonalServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcOsConfigZonalServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcOsConfigZonalServiceStub( + OsConfigZonalServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcOsConfigZonalServiceStub, 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 GrpcOsConfigZonalServiceStub( + OsConfigZonalServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcOsConfigZonalServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcOsConfigZonalServiceStub, 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 GrpcOsConfigZonalServiceStub( + OsConfigZonalServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createOSPolicyAssignmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createOSPolicyAssignmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateOSPolicyAssignmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateOSPolicyAssignmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateOSPolicyAssignmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateOSPolicyAssignmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "os_policy_assignment.name", + String.valueOf(request.getOsPolicyAssignment().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getOSPolicyAssignmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getOSPolicyAssignmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetOSPolicyAssignmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listOSPolicyAssignmentsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listOSPolicyAssignmentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListOSPolicyAssignmentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisionsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listOSPolicyAssignmentRevisionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListOSPolicyAssignmentRevisionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteOSPolicyAssignmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteOSPolicyAssignmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteOSPolicyAssignmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getInstanceOSPoliciesComplianceTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getInstanceOSPoliciesComplianceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GetInstanceOSPoliciesComplianceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliancesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listInstanceOSPoliciesCompliancesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListInstanceOSPoliciesCompliancesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getInventoryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInventoryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetInventoryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listInventoriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInventoriesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListInventoriesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getVulnerabilityReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getVulnerabilityReportMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetVulnerabilityReportRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listVulnerabilityReportsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listVulnerabilityReportsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListVulnerabilityReportsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.createOSPolicyAssignmentCallable = + callableFactory.createUnaryCallable( + createOSPolicyAssignmentTransportSettings, + settings.createOSPolicyAssignmentSettings(), + clientContext); + this.createOSPolicyAssignmentOperationCallable = + callableFactory.createOperationCallable( + createOSPolicyAssignmentTransportSettings, + settings.createOSPolicyAssignmentOperationSettings(), + clientContext, + operationsStub); + this.updateOSPolicyAssignmentCallable = + callableFactory.createUnaryCallable( + updateOSPolicyAssignmentTransportSettings, + settings.updateOSPolicyAssignmentSettings(), + clientContext); + this.updateOSPolicyAssignmentOperationCallable = + callableFactory.createOperationCallable( + updateOSPolicyAssignmentTransportSettings, + settings.updateOSPolicyAssignmentOperationSettings(), + clientContext, + operationsStub); + this.getOSPolicyAssignmentCallable = + callableFactory.createUnaryCallable( + getOSPolicyAssignmentTransportSettings, + settings.getOSPolicyAssignmentSettings(), + clientContext); + this.listOSPolicyAssignmentsCallable = + callableFactory.createUnaryCallable( + listOSPolicyAssignmentsTransportSettings, + settings.listOSPolicyAssignmentsSettings(), + clientContext); + this.listOSPolicyAssignmentsPagedCallable = + callableFactory.createPagedCallable( + listOSPolicyAssignmentsTransportSettings, + settings.listOSPolicyAssignmentsSettings(), + clientContext); + this.listOSPolicyAssignmentRevisionsCallable = + callableFactory.createUnaryCallable( + listOSPolicyAssignmentRevisionsTransportSettings, + settings.listOSPolicyAssignmentRevisionsSettings(), + clientContext); + this.listOSPolicyAssignmentRevisionsPagedCallable = + callableFactory.createPagedCallable( + listOSPolicyAssignmentRevisionsTransportSettings, + settings.listOSPolicyAssignmentRevisionsSettings(), + clientContext); + this.deleteOSPolicyAssignmentCallable = + callableFactory.createUnaryCallable( + deleteOSPolicyAssignmentTransportSettings, + settings.deleteOSPolicyAssignmentSettings(), + clientContext); + this.deleteOSPolicyAssignmentOperationCallable = + callableFactory.createOperationCallable( + deleteOSPolicyAssignmentTransportSettings, + settings.deleteOSPolicyAssignmentOperationSettings(), + clientContext, + operationsStub); + this.getInstanceOSPoliciesComplianceCallable = + callableFactory.createUnaryCallable( + getInstanceOSPoliciesComplianceTransportSettings, + settings.getInstanceOSPoliciesComplianceSettings(), + clientContext); + this.listInstanceOSPoliciesCompliancesCallable = + callableFactory.createUnaryCallable( + listInstanceOSPoliciesCompliancesTransportSettings, + settings.listInstanceOSPoliciesCompliancesSettings(), + clientContext); + this.listInstanceOSPoliciesCompliancesPagedCallable = + callableFactory.createPagedCallable( + listInstanceOSPoliciesCompliancesTransportSettings, + settings.listInstanceOSPoliciesCompliancesSettings(), + clientContext); + this.getInventoryCallable = + callableFactory.createUnaryCallable( + getInventoryTransportSettings, settings.getInventorySettings(), clientContext); + this.listInventoriesCallable = + callableFactory.createUnaryCallable( + listInventoriesTransportSettings, settings.listInventoriesSettings(), clientContext); + this.listInventoriesPagedCallable = + callableFactory.createPagedCallable( + listInventoriesTransportSettings, settings.listInventoriesSettings(), clientContext); + this.getVulnerabilityReportCallable = + callableFactory.createUnaryCallable( + getVulnerabilityReportTransportSettings, + settings.getVulnerabilityReportSettings(), + clientContext); + this.listVulnerabilityReportsCallable = + callableFactory.createUnaryCallable( + listVulnerabilityReportsTransportSettings, + settings.listVulnerabilityReportsSettings(), + clientContext); + this.listVulnerabilityReportsPagedCallable = + callableFactory.createPagedCallable( + listVulnerabilityReportsTransportSettings, + settings.listVulnerabilityReportsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createOSPolicyAssignmentCallable() { + return createOSPolicyAssignmentCallable; + } + + @Override + public OperationCallable< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationCallable() { + return createOSPolicyAssignmentOperationCallable; + } + + @Override + public UnaryCallable + updateOSPolicyAssignmentCallable() { + return updateOSPolicyAssignmentCallable; + } + + @Override + public OperationCallable< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationCallable() { + return updateOSPolicyAssignmentOperationCallable; + } + + @Override + public UnaryCallable + getOSPolicyAssignmentCallable() { + return getOSPolicyAssignmentCallable; + } + + @Override + public UnaryCallable + listOSPolicyAssignmentsCallable() { + return listOSPolicyAssignmentsCallable; + } + + @Override + public UnaryCallable + listOSPolicyAssignmentsPagedCallable() { + return listOSPolicyAssignmentsPagedCallable; + } + + @Override + public UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisionsCallable() { + return listOSPolicyAssignmentRevisionsCallable; + } + + @Override + public UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsPagedCallable() { + return listOSPolicyAssignmentRevisionsPagedCallable; + } + + @Override + public UnaryCallable + deleteOSPolicyAssignmentCallable() { + return deleteOSPolicyAssignmentCallable; + } + + @Override + public OperationCallable< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationCallable() { + return deleteOSPolicyAssignmentOperationCallable; + } + + @Override + public UnaryCallable + getInstanceOSPoliciesComplianceCallable() { + return getInstanceOSPoliciesComplianceCallable; + } + + @Override + public UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliancesCallable() { + return listInstanceOSPoliciesCompliancesCallable; + } + + @Override + public UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesPagedCallable() { + return listInstanceOSPoliciesCompliancesPagedCallable; + } + + @Override + public UnaryCallable getInventoryCallable() { + return getInventoryCallable; + } + + @Override + public UnaryCallable listInventoriesCallable() { + return listInventoriesCallable; + } + + @Override + public UnaryCallable + listInventoriesPagedCallable() { + return listInventoriesPagedCallable; + } + + @Override + public UnaryCallable + getVulnerabilityReportCallable() { + return getVulnerabilityReportCallable; + } + + @Override + public UnaryCallable + listVulnerabilityReportsCallable() { + return listVulnerabilityReportsCallable; + } + + @Override + public UnaryCallable + listVulnerabilityReportsPagedCallable() { + return listVulnerabilityReportsPagedCallable; + } + + @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/v1alpha/stub/OsConfigZonalServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java new file mode 100644 index 00000000..a4f56fe9 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStub.java @@ -0,0 +1,187 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha.stub; + +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; +import com.google.cloud.osconfig.v1alpha.GetInventoryRequest; +import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; +import com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; +import com.google.cloud.osconfig.v1alpha.Inventory; +import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; +import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; +import com.google.cloud.osconfig.v1alpha.ListInventoriesRequest; +import com.google.cloud.osconfig.v1alpha.ListInventoriesResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; +import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; +import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignment; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; +import com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.VulnerabilityReport; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the OsConfigZonalService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class OsConfigZonalServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createOSPolicyAssignmentOperationCallable()"); + } + + public UnaryCallable + createOSPolicyAssignmentCallable() { + throw new UnsupportedOperationException("Not implemented: createOSPolicyAssignmentCallable()"); + } + + public OperationCallable< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateOSPolicyAssignmentOperationCallable()"); + } + + public UnaryCallable + updateOSPolicyAssignmentCallable() { + throw new UnsupportedOperationException("Not implemented: updateOSPolicyAssignmentCallable()"); + } + + public UnaryCallable + getOSPolicyAssignmentCallable() { + throw new UnsupportedOperationException("Not implemented: getOSPolicyAssignmentCallable()"); + } + + public UnaryCallable + listOSPolicyAssignmentsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listOSPolicyAssignmentsPagedCallable()"); + } + + public UnaryCallable + listOSPolicyAssignmentsCallable() { + throw new UnsupportedOperationException("Not implemented: listOSPolicyAssignmentsCallable()"); + } + + public UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listOSPolicyAssignmentRevisionsPagedCallable()"); + } + + public UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisionsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listOSPolicyAssignmentRevisionsCallable()"); + } + + public OperationCallable< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteOSPolicyAssignmentOperationCallable()"); + } + + public UnaryCallable + deleteOSPolicyAssignmentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteOSPolicyAssignmentCallable()"); + } + + public UnaryCallable + getInstanceOSPoliciesComplianceCallable() { + throw new UnsupportedOperationException( + "Not implemented: getInstanceOSPoliciesComplianceCallable()"); + } + + public UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInstanceOSPoliciesCompliancesPagedCallable()"); + } + + public UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliancesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listInstanceOSPoliciesCompliancesCallable()"); + } + + public UnaryCallable getInventoryCallable() { + throw new UnsupportedOperationException("Not implemented: getInventoryCallable()"); + } + + public UnaryCallable + listInventoriesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInventoriesPagedCallable()"); + } + + public UnaryCallable listInventoriesCallable() { + throw new UnsupportedOperationException("Not implemented: listInventoriesCallable()"); + } + + public UnaryCallable + getVulnerabilityReportCallable() { + throw new UnsupportedOperationException("Not implemented: getVulnerabilityReportCallable()"); + } + + public UnaryCallable + listVulnerabilityReportsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listVulnerabilityReportsPagedCallable()"); + } + + public UnaryCallable + listVulnerabilityReportsCallable() { + throw new UnsupportedOperationException("Not implemented: listVulnerabilityReportsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java new file mode 100644 index 00000000..d8c6bacd --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java @@ -0,0 +1,1192 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha.stub; + +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest; +import com.google.cloud.osconfig.v1alpha.GetInventoryRequest; +import com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest; +import com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance; +import com.google.cloud.osconfig.v1alpha.Inventory; +import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest; +import com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse; +import com.google.cloud.osconfig.v1alpha.ListInventoriesRequest; +import com.google.cloud.osconfig.v1alpha.ListInventoriesResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest; +import com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse; +import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest; +import com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignment; +import com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata; +import com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest; +import com.google.cloud.osconfig.v1alpha.VulnerabilityReport; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link OsConfigZonalServiceStub}. + * + *

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 getOSPolicyAssignment to 30 seconds: + * + *

{@code
+ * OsConfigZonalServiceStubSettings.Builder osConfigZonalServiceSettingsBuilder =
+ *     OsConfigZonalServiceStubSettings.newBuilder();
+ * osConfigZonalServiceSettingsBuilder
+ *     .getOSPolicyAssignmentSettings()
+ *     .setRetrySettings(
+ *         osConfigZonalServiceSettingsBuilder
+ *             .getOSPolicyAssignmentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * OsConfigZonalServiceStubSettings osConfigZonalServiceSettings =
+ *     osConfigZonalServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class OsConfigZonalServiceStubSettings + 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 + createOSPolicyAssignmentSettings; + private final OperationCallSettings< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationSettings; + private final UnaryCallSettings + updateOSPolicyAssignmentSettings; + private final OperationCallSettings< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationSettings; + private final UnaryCallSettings + getOSPolicyAssignmentSettings; + private final PagedCallSettings< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + listOSPolicyAssignmentsSettings; + private final PagedCallSettings< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsSettings; + private final UnaryCallSettings + deleteOSPolicyAssignmentSettings; + private final OperationCallSettings< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationSettings; + private final UnaryCallSettings< + GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> + getInstanceOSPoliciesComplianceSettings; + private final PagedCallSettings< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesSettings; + private final UnaryCallSettings getInventorySettings; + private final PagedCallSettings< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + listInventoriesSettings; + private final UnaryCallSettings + getVulnerabilityReportSettings; + private final PagedCallSettings< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsSettings; + + private static final PagedListDescriptor< + ListOSPolicyAssignmentsRequest, ListOSPolicyAssignmentsResponse, OSPolicyAssignment> + LIST_O_S_POLICY_ASSIGNMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + OSPolicyAssignment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOSPolicyAssignmentsRequest injectToken( + ListOSPolicyAssignmentsRequest payload, String token) { + return ListOSPolicyAssignmentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListOSPolicyAssignmentsRequest injectPageSize( + ListOSPolicyAssignmentsRequest payload, int pageSize) { + return ListOSPolicyAssignmentsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListOSPolicyAssignmentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOSPolicyAssignmentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListOSPolicyAssignmentsResponse payload) { + return payload.getOsPolicyAssignmentsList() == null + ? ImmutableList.of() + : payload.getOsPolicyAssignmentsList(); + } + }; + + private static final PagedListDescriptor< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment> + LIST_O_S_POLICY_ASSIGNMENT_REVISIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOSPolicyAssignmentRevisionsRequest injectToken( + ListOSPolicyAssignmentRevisionsRequest payload, String token) { + return ListOSPolicyAssignmentRevisionsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListOSPolicyAssignmentRevisionsRequest injectPageSize( + ListOSPolicyAssignmentRevisionsRequest payload, int pageSize) { + return ListOSPolicyAssignmentRevisionsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListOSPolicyAssignmentRevisionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOSPolicyAssignmentRevisionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListOSPolicyAssignmentRevisionsResponse payload) { + return payload.getOsPolicyAssignmentsList() == null + ? ImmutableList.of() + : payload.getOsPolicyAssignmentsList(); + } + }; + + private static final PagedListDescriptor< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance> + LIST_INSTANCE_O_S_POLICIES_COMPLIANCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstanceOSPoliciesCompliancesRequest injectToken( + ListInstanceOSPoliciesCompliancesRequest payload, String token) { + return ListInstanceOSPoliciesCompliancesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListInstanceOSPoliciesCompliancesRequest injectPageSize( + ListInstanceOSPoliciesCompliancesRequest payload, int pageSize) { + return ListInstanceOSPoliciesCompliancesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListInstanceOSPoliciesCompliancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstanceOSPoliciesCompliancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListInstanceOSPoliciesCompliancesResponse payload) { + return payload.getInstanceOsPoliciesCompliancesList() == null + ? ImmutableList.of() + : payload.getInstanceOsPoliciesCompliancesList(); + } + }; + + private static final PagedListDescriptor< + ListInventoriesRequest, ListInventoriesResponse, Inventory> + LIST_INVENTORIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInventoriesRequest injectToken( + ListInventoriesRequest payload, String token) { + return ListInventoriesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInventoriesRequest injectPageSize( + ListInventoriesRequest payload, int pageSize) { + return ListInventoriesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInventoriesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInventoriesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInventoriesResponse payload) { + return payload.getInventoriesList() == null + ? ImmutableList.of() + : payload.getInventoriesList(); + } + }; + + private static final PagedListDescriptor< + ListVulnerabilityReportsRequest, ListVulnerabilityReportsResponse, VulnerabilityReport> + LIST_VULNERABILITY_REPORTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListVulnerabilityReportsRequest injectToken( + ListVulnerabilityReportsRequest payload, String token) { + return ListVulnerabilityReportsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListVulnerabilityReportsRequest injectPageSize( + ListVulnerabilityReportsRequest payload, int pageSize) { + return ListVulnerabilityReportsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListVulnerabilityReportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListVulnerabilityReportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListVulnerabilityReportsResponse payload) { + return payload.getVulnerabilityReportsList() == null + ? ImmutableList.of() + : payload.getVulnerabilityReportsList(); + } + }; + + private static final PagedListResponseFactory< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + LIST_O_S_POLICY_ASSIGNMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListOSPolicyAssignmentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + OSPolicyAssignment> + pageContext = + PageContext.create( + callable, LIST_O_S_POLICY_ASSIGNMENTS_PAGE_STR_DESC, request, context); + return ListOSPolicyAssignmentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + LIST_O_S_POLICY_ASSIGNMENT_REVISIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse> + callable, + ListOSPolicyAssignmentRevisionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + OSPolicyAssignment> + pageContext = + PageContext.create( + callable, + LIST_O_S_POLICY_ASSIGNMENT_REVISIONS_PAGE_STR_DESC, + request, + context); + return ListOSPolicyAssignmentRevisionsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + LIST_INSTANCE_O_S_POLICIES_COMPLIANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse> + callable, + ListInstanceOSPoliciesCompliancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + InstanceOSPoliciesCompliance> + pageContext = + PageContext.create( + callable, + LIST_INSTANCE_O_S_POLICIES_COMPLIANCES_PAGE_STR_DESC, + request, + context); + return ListInstanceOSPoliciesCompliancesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + LIST_INVENTORIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInventoriesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INVENTORIES_PAGE_STR_DESC, request, context); + return ListInventoriesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + LIST_VULNERABILITY_REPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListVulnerabilityReportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + VulnerabilityReport> + pageContext = + PageContext.create( + callable, LIST_VULNERABILITY_REPORTS_PAGE_STR_DESC, request, context); + return ListVulnerabilityReportsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createOSPolicyAssignment. */ + public UnaryCallSettings + createOSPolicyAssignmentSettings() { + return createOSPolicyAssignmentSettings; + } + + /** Returns the object with the settings used for calls to createOSPolicyAssignment. */ + public OperationCallSettings< + CreateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationSettings() { + return createOSPolicyAssignmentOperationSettings; + } + + /** Returns the object with the settings used for calls to updateOSPolicyAssignment. */ + public UnaryCallSettings + updateOSPolicyAssignmentSettings() { + return updateOSPolicyAssignmentSettings; + } + + /** Returns the object with the settings used for calls to updateOSPolicyAssignment. */ + public OperationCallSettings< + UpdateOSPolicyAssignmentRequest, OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationSettings() { + return updateOSPolicyAssignmentOperationSettings; + } + + /** Returns the object with the settings used for calls to getOSPolicyAssignment. */ + public UnaryCallSettings + getOSPolicyAssignmentSettings() { + return getOSPolicyAssignmentSettings; + } + + /** Returns the object with the settings used for calls to listOSPolicyAssignments. */ + public PagedCallSettings< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + listOSPolicyAssignmentsSettings() { + return listOSPolicyAssignmentsSettings; + } + + /** Returns the object with the settings used for calls to listOSPolicyAssignmentRevisions. */ + public PagedCallSettings< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsSettings() { + return listOSPolicyAssignmentRevisionsSettings; + } + + /** Returns the object with the settings used for calls to deleteOSPolicyAssignment. */ + public UnaryCallSettings + deleteOSPolicyAssignmentSettings() { + return deleteOSPolicyAssignmentSettings; + } + + /** Returns the object with the settings used for calls to deleteOSPolicyAssignment. */ + public OperationCallSettings< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationSettings() { + return deleteOSPolicyAssignmentOperationSettings; + } + + /** Returns the object with the settings used for calls to getInstanceOSPoliciesCompliance. */ + public UnaryCallSettings + getInstanceOSPoliciesComplianceSettings() { + return getInstanceOSPoliciesComplianceSettings; + } + + /** Returns the object with the settings used for calls to listInstanceOSPoliciesCompliances. */ + public PagedCallSettings< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesSettings() { + return listInstanceOSPoliciesCompliancesSettings; + } + + /** Returns the object with the settings used for calls to getInventory. */ + public UnaryCallSettings getInventorySettings() { + return getInventorySettings; + } + + /** Returns the object with the settings used for calls to listInventories. */ + public PagedCallSettings< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + listInventoriesSettings() { + return listInventoriesSettings; + } + + /** Returns the object with the settings used for calls to getVulnerabilityReport. */ + public UnaryCallSettings + getVulnerabilityReportSettings() { + return getVulnerabilityReportSettings; + } + + /** Returns the object with the settings used for calls to listVulnerabilityReports. */ + public PagedCallSettings< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsSettings() { + return listVulnerabilityReportsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public OsConfigZonalServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcOsConfigZonalServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "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(OsConfigZonalServiceStubSettings.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 OsConfigZonalServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createOSPolicyAssignmentSettings = settingsBuilder.createOSPolicyAssignmentSettings().build(); + createOSPolicyAssignmentOperationSettings = + settingsBuilder.createOSPolicyAssignmentOperationSettings().build(); + updateOSPolicyAssignmentSettings = settingsBuilder.updateOSPolicyAssignmentSettings().build(); + updateOSPolicyAssignmentOperationSettings = + settingsBuilder.updateOSPolicyAssignmentOperationSettings().build(); + getOSPolicyAssignmentSettings = settingsBuilder.getOSPolicyAssignmentSettings().build(); + listOSPolicyAssignmentsSettings = settingsBuilder.listOSPolicyAssignmentsSettings().build(); + listOSPolicyAssignmentRevisionsSettings = + settingsBuilder.listOSPolicyAssignmentRevisionsSettings().build(); + deleteOSPolicyAssignmentSettings = settingsBuilder.deleteOSPolicyAssignmentSettings().build(); + deleteOSPolicyAssignmentOperationSettings = + settingsBuilder.deleteOSPolicyAssignmentOperationSettings().build(); + getInstanceOSPoliciesComplianceSettings = + settingsBuilder.getInstanceOSPoliciesComplianceSettings().build(); + listInstanceOSPoliciesCompliancesSettings = + settingsBuilder.listInstanceOSPoliciesCompliancesSettings().build(); + getInventorySettings = settingsBuilder.getInventorySettings().build(); + listInventoriesSettings = settingsBuilder.listInventoriesSettings().build(); + getVulnerabilityReportSettings = settingsBuilder.getVulnerabilityReportSettings().build(); + listVulnerabilityReportsSettings = settingsBuilder.listVulnerabilityReportsSettings().build(); + } + + /** Builder for OsConfigZonalServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createOSPolicyAssignmentSettings; + private final OperationCallSettings.Builder< + CreateOSPolicyAssignmentRequest, + OSPolicyAssignment, + OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationSettings; + private final UnaryCallSettings.Builder + updateOSPolicyAssignmentSettings; + private final OperationCallSettings.Builder< + UpdateOSPolicyAssignmentRequest, + OSPolicyAssignment, + OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationSettings; + private final UnaryCallSettings.Builder + getOSPolicyAssignmentSettings; + private final PagedCallSettings.Builder< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + listOSPolicyAssignmentsSettings; + private final PagedCallSettings.Builder< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsSettings; + private final UnaryCallSettings.Builder + deleteOSPolicyAssignmentSettings; + private final OperationCallSettings.Builder< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationSettings; + private final UnaryCallSettings.Builder< + GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> + getInstanceOSPoliciesComplianceSettings; + private final PagedCallSettings.Builder< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesSettings; + private final UnaryCallSettings.Builder getInventorySettings; + private final PagedCallSettings.Builder< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + listInventoriesSettings; + private final UnaryCallSettings.Builder + getVulnerabilityReportSettings; + private final PagedCallSettings.Builder< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createOSPolicyAssignmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createOSPolicyAssignmentOperationSettings = OperationCallSettings.newBuilder(); + updateOSPolicyAssignmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateOSPolicyAssignmentOperationSettings = OperationCallSettings.newBuilder(); + getOSPolicyAssignmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listOSPolicyAssignmentsSettings = + PagedCallSettings.newBuilder(LIST_O_S_POLICY_ASSIGNMENTS_PAGE_STR_FACT); + listOSPolicyAssignmentRevisionsSettings = + PagedCallSettings.newBuilder(LIST_O_S_POLICY_ASSIGNMENT_REVISIONS_PAGE_STR_FACT); + deleteOSPolicyAssignmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteOSPolicyAssignmentOperationSettings = OperationCallSettings.newBuilder(); + getInstanceOSPoliciesComplianceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listInstanceOSPoliciesCompliancesSettings = + PagedCallSettings.newBuilder(LIST_INSTANCE_O_S_POLICIES_COMPLIANCES_PAGE_STR_FACT); + getInventorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listInventoriesSettings = PagedCallSettings.newBuilder(LIST_INVENTORIES_PAGE_STR_FACT); + getVulnerabilityReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listVulnerabilityReportsSettings = + PagedCallSettings.newBuilder(LIST_VULNERABILITY_REPORTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createOSPolicyAssignmentSettings, + updateOSPolicyAssignmentSettings, + getOSPolicyAssignmentSettings, + listOSPolicyAssignmentsSettings, + listOSPolicyAssignmentRevisionsSettings, + deleteOSPolicyAssignmentSettings, + getInstanceOSPoliciesComplianceSettings, + listInstanceOSPoliciesCompliancesSettings, + getInventorySettings, + listInventoriesSettings, + getVulnerabilityReportSettings, + listVulnerabilityReportsSettings); + initDefaults(this); + } + + protected Builder(OsConfigZonalServiceStubSettings settings) { + super(settings); + + createOSPolicyAssignmentSettings = settings.createOSPolicyAssignmentSettings.toBuilder(); + createOSPolicyAssignmentOperationSettings = + settings.createOSPolicyAssignmentOperationSettings.toBuilder(); + updateOSPolicyAssignmentSettings = settings.updateOSPolicyAssignmentSettings.toBuilder(); + updateOSPolicyAssignmentOperationSettings = + settings.updateOSPolicyAssignmentOperationSettings.toBuilder(); + getOSPolicyAssignmentSettings = settings.getOSPolicyAssignmentSettings.toBuilder(); + listOSPolicyAssignmentsSettings = settings.listOSPolicyAssignmentsSettings.toBuilder(); + listOSPolicyAssignmentRevisionsSettings = + settings.listOSPolicyAssignmentRevisionsSettings.toBuilder(); + deleteOSPolicyAssignmentSettings = settings.deleteOSPolicyAssignmentSettings.toBuilder(); + deleteOSPolicyAssignmentOperationSettings = + settings.deleteOSPolicyAssignmentOperationSettings.toBuilder(); + getInstanceOSPoliciesComplianceSettings = + settings.getInstanceOSPoliciesComplianceSettings.toBuilder(); + listInstanceOSPoliciesCompliancesSettings = + settings.listInstanceOSPoliciesCompliancesSettings.toBuilder(); + getInventorySettings = settings.getInventorySettings.toBuilder(); + listInventoriesSettings = settings.listInventoriesSettings.toBuilder(); + getVulnerabilityReportSettings = settings.getVulnerabilityReportSettings.toBuilder(); + listVulnerabilityReportsSettings = settings.listVulnerabilityReportsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createOSPolicyAssignmentSettings, + updateOSPolicyAssignmentSettings, + getOSPolicyAssignmentSettings, + listOSPolicyAssignmentsSettings, + listOSPolicyAssignmentRevisionsSettings, + deleteOSPolicyAssignmentSettings, + getInstanceOSPoliciesComplianceSettings, + listInstanceOSPoliciesCompliancesSettings, + getInventorySettings, + listInventoriesSettings, + getVulnerabilityReportSettings, + listVulnerabilityReportsSettings); + } + + 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 + .createOSPolicyAssignmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateOSPolicyAssignmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getOSPolicyAssignmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOSPolicyAssignmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOSPolicyAssignmentRevisionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteOSPolicyAssignmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getInstanceOSPoliciesComplianceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listInstanceOSPoliciesCompliancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getInventorySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listInventoriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getVulnerabilityReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listVulnerabilityReportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createOSPolicyAssignmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(OSPolicyAssignment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + OSPolicyAssignmentOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateOSPolicyAssignmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(OSPolicyAssignment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + OSPolicyAssignmentOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteOSPolicyAssignmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + OSPolicyAssignmentOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createOSPolicyAssignment. */ + public UnaryCallSettings.Builder + createOSPolicyAssignmentSettings() { + return createOSPolicyAssignmentSettings; + } + + /** Returns the builder for the settings used for calls to createOSPolicyAssignment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateOSPolicyAssignmentRequest, + OSPolicyAssignment, + OSPolicyAssignmentOperationMetadata> + createOSPolicyAssignmentOperationSettings() { + return createOSPolicyAssignmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateOSPolicyAssignment. */ + public UnaryCallSettings.Builder + updateOSPolicyAssignmentSettings() { + return updateOSPolicyAssignmentSettings; + } + + /** Returns the builder for the settings used for calls to updateOSPolicyAssignment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateOSPolicyAssignmentRequest, + OSPolicyAssignment, + OSPolicyAssignmentOperationMetadata> + updateOSPolicyAssignmentOperationSettings() { + return updateOSPolicyAssignmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to getOSPolicyAssignment. */ + public UnaryCallSettings.Builder + getOSPolicyAssignmentSettings() { + return getOSPolicyAssignmentSettings; + } + + /** Returns the builder for the settings used for calls to listOSPolicyAssignments. */ + public PagedCallSettings.Builder< + ListOSPolicyAssignmentsRequest, + ListOSPolicyAssignmentsResponse, + ListOSPolicyAssignmentsPagedResponse> + listOSPolicyAssignmentsSettings() { + return listOSPolicyAssignmentsSettings; + } + + /** Returns the builder for the settings used for calls to listOSPolicyAssignmentRevisions. */ + public PagedCallSettings.Builder< + ListOSPolicyAssignmentRevisionsRequest, + ListOSPolicyAssignmentRevisionsResponse, + ListOSPolicyAssignmentRevisionsPagedResponse> + listOSPolicyAssignmentRevisionsSettings() { + return listOSPolicyAssignmentRevisionsSettings; + } + + /** Returns the builder for the settings used for calls to deleteOSPolicyAssignment. */ + public UnaryCallSettings.Builder + deleteOSPolicyAssignmentSettings() { + return deleteOSPolicyAssignmentSettings; + } + + /** Returns the builder for the settings used for calls to deleteOSPolicyAssignment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteOSPolicyAssignmentRequest, Empty, OSPolicyAssignmentOperationMetadata> + deleteOSPolicyAssignmentOperationSettings() { + return deleteOSPolicyAssignmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to getInstanceOSPoliciesCompliance. */ + public UnaryCallSettings.Builder< + GetInstanceOSPoliciesComplianceRequest, InstanceOSPoliciesCompliance> + getInstanceOSPoliciesComplianceSettings() { + return getInstanceOSPoliciesComplianceSettings; + } + + /** Returns the builder for the settings used for calls to listInstanceOSPoliciesCompliances. */ + public PagedCallSettings.Builder< + ListInstanceOSPoliciesCompliancesRequest, + ListInstanceOSPoliciesCompliancesResponse, + ListInstanceOSPoliciesCompliancesPagedResponse> + listInstanceOSPoliciesCompliancesSettings() { + return listInstanceOSPoliciesCompliancesSettings; + } + + /** Returns the builder for the settings used for calls to getInventory. */ + public UnaryCallSettings.Builder getInventorySettings() { + return getInventorySettings; + } + + /** Returns the builder for the settings used for calls to listInventories. */ + public PagedCallSettings.Builder< + ListInventoriesRequest, ListInventoriesResponse, ListInventoriesPagedResponse> + listInventoriesSettings() { + return listInventoriesSettings; + } + + /** Returns the builder for the settings used for calls to getVulnerabilityReport. */ + public UnaryCallSettings.Builder + getVulnerabilityReportSettings() { + return getVulnerabilityReportSettings; + } + + /** Returns the builder for the settings used for calls to listVulnerabilityReports. */ + public PagedCallSettings.Builder< + ListVulnerabilityReportsRequest, + ListVulnerabilityReportsResponse, + ListVulnerabilityReportsPagedResponse> + listVulnerabilityReportsSettings() { + return listVulnerabilityReportsSettings; + } + + @Override + public OsConfigZonalServiceStubSettings build() throws IOException { + return new OsConfigZonalServiceStubSettings(this); + } + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java new file mode 100644 index 00000000..d01d0ba9 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java @@ -0,0 +1,1783 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1beta.stub.OsConfigServiceStub; +import com.google.cloud.osconfig.v1beta.stub.OsConfigServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: 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: + * + *

{@code
+ * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+ *   PatchJobs.ExecutePatchJobRequest request =
+ *       PatchJobs.ExecutePatchJobRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setDescription("description-1724546052")
+ *           .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
+ *           .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
+ *           .setDuration(Duration.newBuilder().build())
+ *           .setDryRun(true)
+ *           .setDisplayName("displayName1714148973")
+ *           .build();
+ *   PatchJobs.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: + * + *

{@code
+ * OsConfigServiceSettings osConfigServiceSettings =
+ *     OsConfigServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * OsConfigServiceClient osConfigServiceClient =
+ *     OsConfigServiceClient.create(osConfigServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * OsConfigServiceSettings osConfigServiceSettings =
+ *     OsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * OsConfigServiceClient osConfigServiceClient =
+ *     OsConfigServiceClient.create(osConfigServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +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 using create(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: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ExecutePatchJobRequest request =
+   *       PatchJobs.ExecutePatchJobRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDescription("description-1724546052")
+   *           .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
+   *           .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
+   *           .setDuration(Duration.newBuilder().build())
+   *           .setDryRun(true)
+   *           .setDisplayName("displayName1714148973")
+   *           .build();
+   *   PatchJobs.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 PatchJobs.PatchJob executePatchJob(PatchJobs.ExecutePatchJobRequest request) { + return executePatchJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Patch VM instances by creating and running a patch job. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ExecutePatchJobRequest request =
+   *       PatchJobs.ExecutePatchJobRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setDescription("description-1724546052")
+   *           .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
+   *           .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
+   *           .setDuration(Duration.newBuilder().build())
+   *           .setDryRun(true)
+   *           .setDisplayName("displayName1714148973")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.executePatchJobCallable().futureCall(request);
+   *   // Do something.
+   *   PatchJobs.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: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.GetPatchJobRequest request =
+   *       PatchJobs.GetPatchJobRequest.newBuilder().setName("name3373707").build();
+   *   PatchJobs.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 PatchJobs.PatchJob getPatchJob(PatchJobs.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: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.GetPatchJobRequest request =
+   *       PatchJobs.GetPatchJobRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.getPatchJobCallable().futureCall(request);
+   *   // Do something.
+   *   PatchJobs.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: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.CancelPatchJobRequest request =
+   *       PatchJobs.CancelPatchJobRequest.newBuilder().setName("name3373707").build();
+   *   PatchJobs.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 PatchJobs.PatchJob cancelPatchJob(PatchJobs.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: + * + *

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

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ListPatchJobsRequest request =
+   *       PatchJobs.ListPatchJobsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (PatchJobs.PatchJob element : osConfigServiceClient.listPatchJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPatchJobsPagedResponse listPatchJobs(PatchJobs.ListPatchJobsRequest request) { + return listPatchJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a list of patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ListPatchJobsRequest request =
+   *       PatchJobs.ListPatchJobsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.listPatchJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PatchJobs.PatchJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPatchJobsPagedCallable() { + return stub.listPatchJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a list of patch jobs. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ListPatchJobsRequest request =
+   *       PatchJobs.ListPatchJobsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     PatchJobs.ListPatchJobsResponse response =
+   *         osConfigServiceClient.listPatchJobsCallable().call(request);
+   *     for (PatchJobs.PatchJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + 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: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (PatchJobs.PatchJobInstanceDetails element :
+   *       osConfigServiceClient.listPatchJobInstanceDetails(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent for the instances are in the form of + * `projects/*/patchJobs/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPatchJobInstanceDetailsPagedResponse listPatchJobInstanceDetails(String parent) { + PatchJobs.ListPatchJobInstanceDetailsRequest request = + PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder().setParent(parent).build(); + return listPatchJobInstanceDetails(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a list of instance details for a given patch job. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ListPatchJobInstanceDetailsRequest request =
+   *       PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (PatchJobs.PatchJobInstanceDetails element :
+   *       osConfigServiceClient.listPatchJobInstanceDetails(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPatchJobInstanceDetailsPagedResponse listPatchJobInstanceDetails( + PatchJobs.ListPatchJobInstanceDetailsRequest request) { + return listPatchJobInstanceDetailsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a list of instance details for a given patch job. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ListPatchJobInstanceDetailsRequest request =
+   *       PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.listPatchJobInstanceDetailsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PatchJobs.PatchJobInstanceDetails element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsPagedCallable() { + return stub.listPatchJobInstanceDetailsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a list of instance details for a given patch job. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchJobs.ListPatchJobInstanceDetailsRequest request =
+   *       PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     PatchJobs.ListPatchJobInstanceDetailsResponse response =
+   *         osConfigServiceClient.listPatchJobInstanceDetailsCallable().call(request);
+   *     for (PatchJobs.PatchJobInstanceDetails element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsCallable() { + return stub.listPatchJobInstanceDetailsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.CreatePatchDeploymentRequest request =
+   *       PatchDeployments.CreatePatchDeploymentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPatchDeploymentId("patchDeploymentId-1180405976")
+   *           .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
+   *           .build();
+   *   PatchDeployments.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 PatchDeployments.PatchDeployment createPatchDeployment( + PatchDeployments.CreatePatchDeploymentRequest request) { + return createPatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.CreatePatchDeploymentRequest request =
+   *       PatchDeployments.CreatePatchDeploymentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPatchDeploymentId("patchDeploymentId-1180405976")
+   *           .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.createPatchDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   PatchDeployments.PatchDeployment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentCallable() { + return stub.createPatchDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an OS Config patch deployment. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.ListPatchDeploymentsRequest request =
+   *       PatchDeployments.ListPatchDeploymentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PatchDeployments.PatchDeployment element :
+   *       osConfigServiceClient.listPatchDeployments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPatchDeploymentsPagedResponse listPatchDeployments( + PatchDeployments.ListPatchDeploymentsRequest request) { + return listPatchDeploymentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config patch deployments. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.ListPatchDeploymentsRequest request =
+   *       PatchDeployments.ListPatchDeploymentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.listPatchDeploymentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PatchDeployments.PatchDeployment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, ListPatchDeploymentsPagedResponse> + listPatchDeploymentsPagedCallable() { + return stub.listPatchDeploymentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config patch deployments. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.ListPatchDeploymentsRequest request =
+   *       PatchDeployments.ListPatchDeploymentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     PatchDeployments.ListPatchDeploymentsResponse response =
+   *         osConfigServiceClient.listPatchDeploymentsCallable().call(request);
+   *     for (PatchDeployments.PatchDeployment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeploymentsCallable() { + return stub.listPatchDeploymentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.DeletePatchDeploymentRequest request =
+   *       PatchDeployments.DeletePatchDeploymentRequest.newBuilder().setName("name3373707").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(PatchDeployments.DeletePatchDeploymentRequest request) { + deletePatchDeploymentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an OS Config patch deployment. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   PatchDeployments.DeletePatchDeploymentRequest request =
+   *       PatchDeployments.DeletePatchDeploymentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.deletePatchDeploymentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deletePatchDeploymentCallable() { + return stub.deletePatchDeploymentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build();
+   *   GuestPolicies.GuestPolicy response =
+   *       osConfigServiceClient.createGuestPolicy(parent, guestPolicy);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent using one of the following forms: + * `projects/{project_number}`. + * @param guestPolicy Required. The GuestPolicy to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GuestPolicies.GuestPolicy createGuestPolicy( + ProjectName parent, GuestPolicies.GuestPolicy guestPolicy) { + GuestPolicies.CreateGuestPolicyRequest request = + GuestPolicies.CreateGuestPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setGuestPolicy(guestPolicy) + .build(); + return createGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String parent = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString();
+   *   GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build();
+   *   GuestPolicies.GuestPolicy response =
+   *       osConfigServiceClient.createGuestPolicy(parent, guestPolicy);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent using one of the following forms: + * `projects/{project_number}`. + * @param guestPolicy Required. The GuestPolicy to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GuestPolicies.GuestPolicy createGuestPolicy( + String parent, GuestPolicies.GuestPolicy guestPolicy) { + GuestPolicies.CreateGuestPolicyRequest request = + GuestPolicies.CreateGuestPolicyRequest.newBuilder() + .setParent(parent) + .setGuestPolicy(guestPolicy) + .build(); + return createGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.CreateGuestPolicyRequest request =
+   *       GuestPolicies.CreateGuestPolicyRequest.newBuilder()
+   *           .setParent(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .setGuestPolicyId("guestPolicyId1234592741")
+   *           .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
+   *           .build();
+   *   GuestPolicies.GuestPolicy response = osConfigServiceClient.createGuestPolicy(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 GuestPolicies.GuestPolicy createGuestPolicy( + GuestPolicies.CreateGuestPolicyRequest request) { + return createGuestPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.CreateGuestPolicyRequest request =
+   *       GuestPolicies.CreateGuestPolicyRequest.newBuilder()
+   *           .setParent(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .setGuestPolicyId("guestPolicyId1234592741")
+   *           .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.createGuestPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   GuestPolicies.GuestPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createGuestPolicyCallable() { + return stub.createGuestPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]");
+   *   GuestPolicies.GuestPolicy response = osConfigServiceClient.getGuestPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the guest policy using one of the following forms: + * `projects/{project_number}/guestPolicies/{guest_policy_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GuestPolicies.GuestPolicy getGuestPolicy(GuestPolicyName name) { + GuestPolicies.GetGuestPolicyRequest request = + GuestPolicies.GetGuestPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString();
+   *   GuestPolicies.GuestPolicy response = osConfigServiceClient.getGuestPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the guest policy using one of the following forms: + * `projects/{project_number}/guestPolicies/{guest_policy_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GuestPolicies.GuestPolicy getGuestPolicy(String name) { + GuestPolicies.GetGuestPolicyRequest request = + GuestPolicies.GetGuestPolicyRequest.newBuilder().setName(name).build(); + return getGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.GetGuestPolicyRequest request =
+   *       GuestPolicies.GetGuestPolicyRequest.newBuilder()
+   *           .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .build();
+   *   GuestPolicies.GuestPolicy response = osConfigServiceClient.getGuestPolicy(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 GuestPolicies.GuestPolicy getGuestPolicy( + GuestPolicies.GetGuestPolicyRequest request) { + return getGuestPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.GetGuestPolicyRequest request =
+   *       GuestPolicies.GetGuestPolicyRequest.newBuilder()
+   *           .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.getGuestPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   GuestPolicies.GuestPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getGuestPolicyCallable() { + return stub.getGuestPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config guest policies. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (GuestPolicies.GuestPolicy element :
+   *       osConfigServiceClient.listGuestPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent using one of the following forms: + * `projects/{project_number}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGuestPoliciesPagedResponse listGuestPolicies(ProjectName parent) { + GuestPolicies.ListGuestPoliciesRequest request = + GuestPolicies.ListGuestPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listGuestPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config guest policies. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String parent = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString();
+   *   for (GuestPolicies.GuestPolicy element :
+   *       osConfigServiceClient.listGuestPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent using one of the following forms: + * `projects/{project_number}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGuestPoliciesPagedResponse listGuestPolicies(String parent) { + GuestPolicies.ListGuestPoliciesRequest request = + GuestPolicies.ListGuestPoliciesRequest.newBuilder().setParent(parent).build(); + return listGuestPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config guest policies. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.ListGuestPoliciesRequest request =
+   *       GuestPolicies.ListGuestPoliciesRequest.newBuilder()
+   *           .setParent(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (GuestPolicies.GuestPolicy element :
+   *       osConfigServiceClient.listGuestPolicies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGuestPoliciesPagedResponse listGuestPolicies( + GuestPolicies.ListGuestPoliciesRequest request) { + return listGuestPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config guest policies. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.ListGuestPoliciesRequest request =
+   *       GuestPolicies.ListGuestPoliciesRequest.newBuilder()
+   *           .setParent(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.listGuestPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (GuestPolicies.GuestPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listGuestPoliciesPagedCallable() { + return stub.listGuestPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a page of OS Config guest policies. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.ListGuestPoliciesRequest request =
+   *       GuestPolicies.ListGuestPoliciesRequest.newBuilder()
+   *           .setParent(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     GuestPolicies.ListGuestPoliciesResponse response =
+   *         osConfigServiceClient.listGuestPoliciesCallable().call(request);
+   *     for (GuestPolicies.GuestPolicy element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + GuestPolicies.ListGuestPoliciesRequest, GuestPolicies.ListGuestPoliciesResponse> + listGuestPoliciesCallable() { + return stub.listGuestPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   GuestPolicies.GuestPolicy response =
+   *       osConfigServiceClient.updateGuestPolicy(guestPolicy, updateMask);
+   * }
+   * }
+ * + * @param guestPolicy Required. The updated GuestPolicy. + * @param updateMask Field mask that controls which fields of the guest policy should be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GuestPolicies.GuestPolicy updateGuestPolicy( + GuestPolicies.GuestPolicy guestPolicy, FieldMask updateMask) { + GuestPolicies.UpdateGuestPolicyRequest request = + GuestPolicies.UpdateGuestPolicyRequest.newBuilder() + .setGuestPolicy(guestPolicy) + .setUpdateMask(updateMask) + .build(); + return updateGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.UpdateGuestPolicyRequest request =
+   *       GuestPolicies.UpdateGuestPolicyRequest.newBuilder()
+   *           .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   GuestPolicies.GuestPolicy response = osConfigServiceClient.updateGuestPolicy(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 GuestPolicies.GuestPolicy updateGuestPolicy( + GuestPolicies.UpdateGuestPolicyRequest request) { + return updateGuestPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.UpdateGuestPolicyRequest request =
+   *       GuestPolicies.UpdateGuestPolicyRequest.newBuilder()
+   *           .setGuestPolicy(GuestPolicies.GuestPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.updateGuestPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   GuestPolicies.GuestPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateGuestPolicyCallable() { + return stub.updateGuestPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]");
+   *   osConfigServiceClient.deleteGuestPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the guest policy using one of the following forms: + * `projects/{project_number}/guestPolicies/{guest_policy_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteGuestPolicy(GuestPolicyName name) { + GuestPolicies.DeleteGuestPolicyRequest request = + GuestPolicies.DeleteGuestPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   String name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString();
+   *   osConfigServiceClient.deleteGuestPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the guest policy using one of the following forms: + * `projects/{project_number}/guestPolicies/{guest_policy_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteGuestPolicy(String name) { + GuestPolicies.DeleteGuestPolicyRequest request = + GuestPolicies.DeleteGuestPolicyRequest.newBuilder().setName(name).build(); + deleteGuestPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.DeleteGuestPolicyRequest request =
+   *       GuestPolicies.DeleteGuestPolicyRequest.newBuilder()
+   *           .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .build();
+   *   osConfigServiceClient.deleteGuestPolicy(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 deleteGuestPolicy(GuestPolicies.DeleteGuestPolicyRequest request) { + deleteGuestPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an OS Config guest policy. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.DeleteGuestPolicyRequest request =
+   *       GuestPolicies.DeleteGuestPolicyRequest.newBuilder()
+   *           .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.deleteGuestPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteGuestPolicyCallable() { + return stub.deleteGuestPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup the effective guest policy that applies to a VM instance. This lookup merges all + * policies that are assigned to the instance ancestry. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.LookupEffectiveGuestPolicyRequest request =
+   *       GuestPolicies.LookupEffectiveGuestPolicyRequest.newBuilder()
+   *           .setInstance("instance555127957")
+   *           .setOsShortName("osShortName1253394339")
+   *           .setOsVersion("osVersion1812004436")
+   *           .setOsArchitecture("osArchitecture1339954519")
+   *           .build();
+   *   GuestPolicies.EffectiveGuestPolicy response =
+   *       osConfigServiceClient.lookupEffectiveGuestPolicy(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 GuestPolicies.EffectiveGuestPolicy lookupEffectiveGuestPolicy( + GuestPolicies.LookupEffectiveGuestPolicyRequest request) { + return lookupEffectiveGuestPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lookup the effective guest policy that applies to a VM instance. This lookup merges all + * policies that are assigned to the instance ancestry. + * + *

Sample code: + * + *

{@code
+   * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+   *   GuestPolicies.LookupEffectiveGuestPolicyRequest request =
+   *       GuestPolicies.LookupEffectiveGuestPolicyRequest.newBuilder()
+   *           .setInstance("instance555127957")
+   *           .setOsShortName("osShortName1253394339")
+   *           .setOsVersion("osVersion1812004436")
+   *           .setOsArchitecture("osArchitecture1339954519")
+   *           .build();
+   *   ApiFuture future =
+   *       osConfigServiceClient.lookupEffectiveGuestPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   GuestPolicies.EffectiveGuestPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicyCallable() { + return stub.lookupEffectiveGuestPolicyCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPatchJobsPagedResponse + extends AbstractPagedListResponse< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + PatchJobs.PatchJob, + ListPatchJobsPage, + ListPatchJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse, PatchJobs.PatchJob> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPatchJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListPatchJobsPagedResponse apply(ListPatchJobsPage input) { + return new ListPatchJobsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListPatchJobsPagedResponse(ListPatchJobsPage page) { + super(page, ListPatchJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPatchJobsPage + extends AbstractPage< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + PatchJobs.PatchJob, + ListPatchJobsPage> { + + private ListPatchJobsPage( + PageContext< + PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse, PatchJobs.PatchJob> + context, + PatchJobs.ListPatchJobsResponse response) { + super(context, response); + } + + private static ListPatchJobsPage createEmptyPage() { + return new ListPatchJobsPage(null, null); + } + + @Override + protected ListPatchJobsPage createPage( + PageContext< + PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse, PatchJobs.PatchJob> + context, + PatchJobs.ListPatchJobsResponse response) { + return new ListPatchJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse, PatchJobs.PatchJob> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPatchJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + PatchJobs.PatchJob, + ListPatchJobsPage, + ListPatchJobsFixedSizeCollection> { + + private ListPatchJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPatchJobsFixedSizeCollection createEmptyCollection() { + return new ListPatchJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListPatchJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPatchJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPatchJobInstanceDetailsPagedResponse + extends AbstractPagedListResponse< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails, + ListPatchJobInstanceDetailsPage, + ListPatchJobInstanceDetailsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPatchJobInstanceDetailsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction< + ListPatchJobInstanceDetailsPage, ListPatchJobInstanceDetailsPagedResponse>() { + @Override + public ListPatchJobInstanceDetailsPagedResponse apply( + ListPatchJobInstanceDetailsPage input) { + return new ListPatchJobInstanceDetailsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListPatchJobInstanceDetailsPagedResponse(ListPatchJobInstanceDetailsPage page) { + super(page, ListPatchJobInstanceDetailsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPatchJobInstanceDetailsPage + extends AbstractPage< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails, + ListPatchJobInstanceDetailsPage> { + + private ListPatchJobInstanceDetailsPage( + PageContext< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails> + context, + PatchJobs.ListPatchJobInstanceDetailsResponse response) { + super(context, response); + } + + private static ListPatchJobInstanceDetailsPage createEmptyPage() { + return new ListPatchJobInstanceDetailsPage(null, null); + } + + @Override + protected ListPatchJobInstanceDetailsPage createPage( + PageContext< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails> + context, + PatchJobs.ListPatchJobInstanceDetailsResponse response) { + return new ListPatchJobInstanceDetailsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPatchJobInstanceDetailsFixedSizeCollection + extends AbstractFixedSizeCollection< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails, + ListPatchJobInstanceDetailsPage, + ListPatchJobInstanceDetailsFixedSizeCollection> { + + private ListPatchJobInstanceDetailsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPatchJobInstanceDetailsFixedSizeCollection createEmptyCollection() { + return new ListPatchJobInstanceDetailsFixedSizeCollection(null, 0); + } + + @Override + protected ListPatchJobInstanceDetailsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPatchJobInstanceDetailsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPatchDeploymentsPagedResponse + extends AbstractPagedListResponse< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment, + ListPatchDeploymentsPage, + ListPatchDeploymentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPatchDeploymentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListPatchDeploymentsPagedResponse apply(ListPatchDeploymentsPage input) { + return new ListPatchDeploymentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListPatchDeploymentsPagedResponse(ListPatchDeploymentsPage page) { + super(page, ListPatchDeploymentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPatchDeploymentsPage + extends AbstractPage< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment, + ListPatchDeploymentsPage> { + + private ListPatchDeploymentsPage( + PageContext< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment> + context, + PatchDeployments.ListPatchDeploymentsResponse response) { + super(context, response); + } + + private static ListPatchDeploymentsPage createEmptyPage() { + return new ListPatchDeploymentsPage(null, null); + } + + @Override + protected ListPatchDeploymentsPage createPage( + PageContext< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment> + context, + PatchDeployments.ListPatchDeploymentsResponse response) { + return new ListPatchDeploymentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPatchDeploymentsFixedSizeCollection + extends AbstractFixedSizeCollection< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment, + ListPatchDeploymentsPage, + ListPatchDeploymentsFixedSizeCollection> { + + private ListPatchDeploymentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPatchDeploymentsFixedSizeCollection createEmptyCollection() { + return new ListPatchDeploymentsFixedSizeCollection(null, 0); + } + + @Override + protected ListPatchDeploymentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPatchDeploymentsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListGuestPoliciesPagedResponse + extends AbstractPagedListResponse< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy, + ListGuestPoliciesPage, + ListGuestPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGuestPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListGuestPoliciesPagedResponse apply(ListGuestPoliciesPage input) { + return new ListGuestPoliciesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListGuestPoliciesPagedResponse(ListGuestPoliciesPage page) { + super(page, ListGuestPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGuestPoliciesPage + extends AbstractPage< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy, + ListGuestPoliciesPage> { + + private ListGuestPoliciesPage( + PageContext< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy> + context, + GuestPolicies.ListGuestPoliciesResponse response) { + super(context, response); + } + + private static ListGuestPoliciesPage createEmptyPage() { + return new ListGuestPoliciesPage(null, null); + } + + @Override + protected ListGuestPoliciesPage createPage( + PageContext< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy> + context, + GuestPolicies.ListGuestPoliciesResponse response) { + return new ListGuestPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGuestPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy, + ListGuestPoliciesPage, + ListGuestPoliciesFixedSizeCollection> { + + private ListGuestPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGuestPoliciesFixedSizeCollection createEmptyCollection() { + return new ListGuestPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListGuestPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGuestPoliciesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java new file mode 100644 index 00000000..5c7833cc --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java @@ -0,0 +1,391 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse; + +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.osconfig.v1beta.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: + * + *

{@code
+ * OsConfigServiceSettings.Builder osConfigServiceSettingsBuilder =
+ *     OsConfigServiceSettings.newBuilder();
+ * osConfigServiceSettingsBuilder
+ *     .executePatchJobSettings()
+ *     .setRetrySettings(
+ *         osConfigServiceSettingsBuilder
+ *             .executePatchJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * OsConfigServiceSettings osConfigServiceSettings = osConfigServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +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 PagedCallSettings< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + listPatchJobsSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listPatchJobsSettings(); + } + + /** Returns the object with the settings used for calls to listPatchJobInstanceDetails. */ + public PagedCallSettings< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listPatchJobInstanceDetailsSettings(); + } + + /** Returns the object with the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).createPatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).getPatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to listPatchDeployments. */ + public PagedCallSettings< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + listPatchDeploymentsSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listPatchDeploymentsSettings(); + } + + /** Returns the object with the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings + deletePatchDeploymentSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).deletePatchDeploymentSettings(); + } + + /** Returns the object with the settings used for calls to createGuestPolicy. */ + public UnaryCallSettings + createGuestPolicySettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).createGuestPolicySettings(); + } + + /** Returns the object with the settings used for calls to getGuestPolicy. */ + public UnaryCallSettings + getGuestPolicySettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).getGuestPolicySettings(); + } + + /** Returns the object with the settings used for calls to listGuestPolicies. */ + public PagedCallSettings< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + listGuestPoliciesSettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).listGuestPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to updateGuestPolicy. */ + public UnaryCallSettings + updateGuestPolicySettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).updateGuestPolicySettings(); + } + + /** Returns the object with the settings used for calls to deleteGuestPolicy. */ + public UnaryCallSettings + deleteGuestPolicySettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).deleteGuestPolicySettings(); + } + + /** Returns the object with the settings used for calls to lookupEffectiveGuestPolicy. */ + public UnaryCallSettings< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicySettings() { + return ((OsConfigServiceStubSettings) getStubSettings()).lookupEffectiveGuestPolicySettings(); + } + + 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)); + } + + protected Builder(OsConfigServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(OsConfigServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(OsConfigServiceStubSettings.newBuilder()); + } + + 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 PagedCallSettings.Builder< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + listPatchJobsSettings() { + return getStubSettingsBuilder().listPatchJobsSettings(); + } + + /** Returns the builder for the settings used for calls to listPatchJobInstanceDetails. */ + public PagedCallSettings.Builder< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsSettings() { + return getStubSettingsBuilder().listPatchJobInstanceDetailsSettings(); + } + + /** Returns the builder for the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentSettings() { + return getStubSettingsBuilder().createPatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentSettings() { + return getStubSettingsBuilder().getPatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to listPatchDeployments. */ + public PagedCallSettings.Builder< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + listPatchDeploymentsSettings() { + return getStubSettingsBuilder().listPatchDeploymentsSettings(); + } + + /** Returns the builder for the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings.Builder + deletePatchDeploymentSettings() { + return getStubSettingsBuilder().deletePatchDeploymentSettings(); + } + + /** Returns the builder for the settings used for calls to createGuestPolicy. */ + public UnaryCallSettings.Builder< + GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> + createGuestPolicySettings() { + return getStubSettingsBuilder().createGuestPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getGuestPolicy. */ + public UnaryCallSettings.Builder + getGuestPolicySettings() { + return getStubSettingsBuilder().getGuestPolicySettings(); + } + + /** Returns the builder for the settings used for calls to listGuestPolicies. */ + public PagedCallSettings.Builder< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + listGuestPoliciesSettings() { + return getStubSettingsBuilder().listGuestPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to updateGuestPolicy. */ + public UnaryCallSettings.Builder< + GuestPolicies.UpdateGuestPolicyRequest, GuestPolicies.GuestPolicy> + updateGuestPolicySettings() { + return getStubSettingsBuilder().updateGuestPolicySettings(); + } + + /** Returns the builder for the settings used for calls to deleteGuestPolicy. */ + public UnaryCallSettings.Builder + deleteGuestPolicySettings() { + return getStubSettingsBuilder().deleteGuestPolicySettings(); + } + + /** Returns the builder for the settings used for calls to lookupEffectiveGuestPolicy. */ + public UnaryCallSettings.Builder< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicySettings() { + return getStubSettingsBuilder().lookupEffectiveGuestPolicySettings(); + } + + @Override + public OsConfigServiceSettings build() throws IOException { + return new OsConfigServiceSettings(this); + } + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json new file mode 100644 index 00000000..f71fb233 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.osconfig.v1beta", + "libraryPackage": "com.google.cloud.osconfig.v1beta", + "services": { + "OsConfigService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigServiceClient", + "rpcs": { + "CancelPatchJob": { + "methods": ["cancelPatchJob", "cancelPatchJobCallable"] + }, + "CreateGuestPolicy": { + "methods": ["createGuestPolicy", "createGuestPolicy", "createGuestPolicy", "createGuestPolicyCallable"] + }, + "CreatePatchDeployment": { + "methods": ["createPatchDeployment", "createPatchDeploymentCallable"] + }, + "DeleteGuestPolicy": { + "methods": ["deleteGuestPolicy", "deleteGuestPolicy", "deleteGuestPolicy", "deleteGuestPolicyCallable"] + }, + "DeletePatchDeployment": { + "methods": ["deletePatchDeployment", "deletePatchDeploymentCallable"] + }, + "ExecutePatchJob": { + "methods": ["executePatchJob", "executePatchJobCallable"] + }, + "GetGuestPolicy": { + "methods": ["getGuestPolicy", "getGuestPolicy", "getGuestPolicy", "getGuestPolicyCallable"] + }, + "GetPatchDeployment": { + "methods": ["getPatchDeployment", "getPatchDeploymentCallable"] + }, + "GetPatchJob": { + "methods": ["getPatchJob", "getPatchJobCallable"] + }, + "ListGuestPolicies": { + "methods": ["listGuestPolicies", "listGuestPolicies", "listGuestPolicies", "listGuestPoliciesPagedCallable", "listGuestPoliciesCallable"] + }, + "ListPatchDeployments": { + "methods": ["listPatchDeployments", "listPatchDeploymentsPagedCallable", "listPatchDeploymentsCallable"] + }, + "ListPatchJobInstanceDetails": { + "methods": ["listPatchJobInstanceDetails", "listPatchJobInstanceDetails", "listPatchJobInstanceDetailsPagedCallable", "listPatchJobInstanceDetailsCallable"] + }, + "ListPatchJobs": { + "methods": ["listPatchJobs", "listPatchJobsPagedCallable", "listPatchJobsCallable"] + }, + "LookupEffectiveGuestPolicy": { + "methods": ["lookupEffectiveGuestPolicy", "lookupEffectiveGuestPolicyCallable"] + }, + "UpdateGuestPolicy": { + "methods": ["updateGuestPolicy", "updateGuestPolicy", "updateGuestPolicyCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java new file mode 100644 index 00000000..319eeadf --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/package-info.java @@ -0,0 +1,48 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

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

{@code
+ * try (OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.create()) {
+ *   PatchJobs.ExecutePatchJobRequest request =
+ *       PatchJobs.ExecutePatchJobRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setDescription("description-1724546052")
+ *           .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build())
+ *           .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build())
+ *           .setDuration(Duration.newBuilder().build())
+ *           .setDryRun(true)
+ *           .setDisplayName("displayName1714148973")
+ *           .build();
+ *   PatchJobs.PatchJob response = osConfigServiceClient.executePatchJob(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.osconfig.v1beta; + +import javax.annotation.Generated; diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceCallableFactory.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceCallableFactory.java new file mode 100644 index 00000000..d96953fd --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the OsConfigService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +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 callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java new file mode 100644 index 00000000..c1c38ad7 --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java @@ -0,0 +1,847 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta.stub; + +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse; + +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.v1beta.GuestPolicies; +import com.google.cloud.osconfig.v1beta.PatchDeployments; +import com.google.cloud.osconfig.v1beta.PatchJobs; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the OsConfigService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcOsConfigServiceStub extends OsConfigServiceStub { + private static final MethodDescriptor + executePatchJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/ExecutePatchJob") + .setRequestMarshaller( + ProtoUtils.marshaller(PatchJobs.ExecutePatchJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchJobs.PatchJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getPatchJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/GetPatchJob") + .setRequestMarshaller( + ProtoUtils.marshaller(PatchJobs.GetPatchJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchJobs.PatchJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelPatchJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/CancelPatchJob") + .setRequestMarshaller( + ProtoUtils.marshaller(PatchJobs.CancelPatchJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PatchJobs.PatchJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse> + listPatchJobsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/ListPatchJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(PatchJobs.ListPatchJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PatchJobs.ListPatchJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/ListPatchJobInstanceDetails") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchJobs.ListPatchJobInstanceDetailsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + PatchJobs.ListPatchJobInstanceDetailsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/CreatePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.CreatePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PatchDeployments.PatchDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/GetPatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.GetPatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PatchDeployments.PatchDeployment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeploymentsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/ListPatchDeployments") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.ListPatchDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + PatchDeployments.ListPatchDeploymentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePatchDeploymentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/DeletePatchDeployment") + .setRequestMarshaller( + ProtoUtils.marshaller( + PatchDeployments.DeletePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> + createGuestPolicyMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/CreateGuestPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + GuestPolicies.CreateGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GuestPolicies.GuestPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GuestPolicies.GetGuestPolicyRequest, GuestPolicies.GuestPolicy> + getGuestPolicyMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/GetGuestPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(GuestPolicies.GetGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GuestPolicies.GuestPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GuestPolicies.ListGuestPoliciesRequest, GuestPolicies.ListGuestPoliciesResponse> + listGuestPoliciesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/ListGuestPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller( + GuestPolicies.ListGuestPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + GuestPolicies.ListGuestPoliciesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GuestPolicies.UpdateGuestPolicyRequest, GuestPolicies.GuestPolicy> + updateGuestPolicyMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/UpdateGuestPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + GuestPolicies.UpdateGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GuestPolicies.GuestPolicy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteGuestPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.osconfig.v1beta.OsConfigService/DeleteGuestPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + GuestPolicies.DeleteGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicyMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.osconfig.v1beta.OsConfigService/LookupEffectiveGuestPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller( + GuestPolicies.LookupEffectiveGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GuestPolicies.EffectiveGuestPolicy.getDefaultInstance())) + .build(); + + private final UnaryCallable + executePatchJobCallable; + private final UnaryCallable getPatchJobCallable; + private final UnaryCallable + cancelPatchJobCallable; + private final UnaryCallable + listPatchJobsCallable; + private final UnaryCallable + listPatchJobsPagedCallable; + private final UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsCallable; + private final UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsPagedCallable; + private final UnaryCallable< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentCallable; + private final UnaryCallable< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentCallable; + private final UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeploymentsCallable; + private final UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, ListPatchDeploymentsPagedResponse> + listPatchDeploymentsPagedCallable; + private final UnaryCallable + deletePatchDeploymentCallable; + private final UnaryCallable + createGuestPolicyCallable; + private final UnaryCallable + getGuestPolicyCallable; + private final UnaryCallable< + GuestPolicies.ListGuestPoliciesRequest, GuestPolicies.ListGuestPoliciesResponse> + listGuestPoliciesCallable; + private final UnaryCallable< + GuestPolicies.ListGuestPoliciesRequest, ListGuestPoliciesPagedResponse> + listGuestPoliciesPagedCallable; + private final UnaryCallable + updateGuestPolicyCallable; + private final UnaryCallable + deleteGuestPolicyCallable; + private final UnaryCallable< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicyCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + 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; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + executePatchJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(executePatchJobMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PatchJobs.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(PatchJobs.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(PatchJobs.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(PatchJobs.ListPatchJobsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listPatchJobInstanceDetailsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + PatchJobs.ListPatchJobInstanceDetailsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(createPatchDeploymentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + PatchDeployments.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( + PatchDeployments.GetPatchDeploymentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeploymentsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listPatchDeploymentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + PatchDeployments.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( + PatchDeployments.DeletePatchDeploymentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createGuestPolicyTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createGuestPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GuestPolicies.CreateGuestPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getGuestPolicyTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getGuestPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GuestPolicies.GetGuestPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + GuestPolicies.ListGuestPoliciesRequest, GuestPolicies.ListGuestPoliciesResponse> + listGuestPoliciesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listGuestPoliciesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GuestPolicies.ListGuestPoliciesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateGuestPolicyTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(updateGuestPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GuestPolicies.UpdateGuestPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "guest_policy.name", + String.valueOf(request.getGuestPolicy().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteGuestPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteGuestPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GuestPolicies.DeleteGuestPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicyTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(lookupEffectiveGuestPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GuestPolicies.LookupEffectiveGuestPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("instance", String.valueOf(request.getInstance())); + 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.listPatchJobsPagedCallable = + callableFactory.createPagedCallable( + listPatchJobsTransportSettings, settings.listPatchJobsSettings(), clientContext); + this.listPatchJobInstanceDetailsCallable = + callableFactory.createUnaryCallable( + listPatchJobInstanceDetailsTransportSettings, + settings.listPatchJobInstanceDetailsSettings(), + clientContext); + this.listPatchJobInstanceDetailsPagedCallable = + callableFactory.createPagedCallable( + 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.listPatchDeploymentsPagedCallable = + callableFactory.createPagedCallable( + listPatchDeploymentsTransportSettings, + settings.listPatchDeploymentsSettings(), + clientContext); + this.deletePatchDeploymentCallable = + callableFactory.createUnaryCallable( + deletePatchDeploymentTransportSettings, + settings.deletePatchDeploymentSettings(), + clientContext); + this.createGuestPolicyCallable = + callableFactory.createUnaryCallable( + createGuestPolicyTransportSettings, + settings.createGuestPolicySettings(), + clientContext); + this.getGuestPolicyCallable = + callableFactory.createUnaryCallable( + getGuestPolicyTransportSettings, settings.getGuestPolicySettings(), clientContext); + this.listGuestPoliciesCallable = + callableFactory.createUnaryCallable( + listGuestPoliciesTransportSettings, + settings.listGuestPoliciesSettings(), + clientContext); + this.listGuestPoliciesPagedCallable = + callableFactory.createPagedCallable( + listGuestPoliciesTransportSettings, + settings.listGuestPoliciesSettings(), + clientContext); + this.updateGuestPolicyCallable = + callableFactory.createUnaryCallable( + updateGuestPolicyTransportSettings, + settings.updateGuestPolicySettings(), + clientContext); + this.deleteGuestPolicyCallable = + callableFactory.createUnaryCallable( + deleteGuestPolicyTransportSettings, + settings.deleteGuestPolicySettings(), + clientContext); + this.lookupEffectiveGuestPolicyCallable = + callableFactory.createUnaryCallable( + lookupEffectiveGuestPolicyTransportSettings, + settings.lookupEffectiveGuestPolicySettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + executePatchJobCallable() { + return executePatchJobCallable; + } + + @Override + public UnaryCallable getPatchJobCallable() { + return getPatchJobCallable; + } + + @Override + public UnaryCallable + cancelPatchJobCallable() { + return cancelPatchJobCallable; + } + + @Override + public UnaryCallable + listPatchJobsCallable() { + return listPatchJobsCallable; + } + + @Override + public UnaryCallable + listPatchJobsPagedCallable() { + return listPatchJobsPagedCallable; + } + + @Override + public UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsCallable() { + return listPatchJobInstanceDetailsCallable; + } + + @Override + public UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsPagedCallable() { + return listPatchJobInstanceDetailsPagedCallable; + } + + @Override + public UnaryCallable< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentCallable() { + return createPatchDeploymentCallable; + } + + @Override + public UnaryCallable + getPatchDeploymentCallable() { + return getPatchDeploymentCallable; + } + + @Override + public UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeploymentsCallable() { + return listPatchDeploymentsCallable; + } + + @Override + public UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, ListPatchDeploymentsPagedResponse> + listPatchDeploymentsPagedCallable() { + return listPatchDeploymentsPagedCallable; + } + + @Override + public UnaryCallable + deletePatchDeploymentCallable() { + return deletePatchDeploymentCallable; + } + + @Override + public UnaryCallable + createGuestPolicyCallable() { + return createGuestPolicyCallable; + } + + @Override + public UnaryCallable + getGuestPolicyCallable() { + return getGuestPolicyCallable; + } + + @Override + public UnaryCallable< + GuestPolicies.ListGuestPoliciesRequest, GuestPolicies.ListGuestPoliciesResponse> + listGuestPoliciesCallable() { + return listGuestPoliciesCallable; + } + + @Override + public UnaryCallable + listGuestPoliciesPagedCallable() { + return listGuestPoliciesPagedCallable; + } + + @Override + public UnaryCallable + updateGuestPolicyCallable() { + return updateGuestPolicyCallable; + } + + @Override + public UnaryCallable deleteGuestPolicyCallable() { + return deleteGuestPolicyCallable; + } + + @Override + public UnaryCallable< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicyCallable() { + return lookupEffectiveGuestPolicyCallable; + } + + @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/v1beta/stub/OsConfigServiceStub.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java new file mode 100644 index 00000000..6c57d94d --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStub.java @@ -0,0 +1,150 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta.stub; + +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse; + +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.v1beta.GuestPolicies; +import com.google.cloud.osconfig.v1beta.PatchDeployments; +import com.google.cloud.osconfig.v1beta.PatchJobs; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the OsConfigService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +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 + listPatchJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPatchJobsPagedCallable()"); + } + + public UnaryCallable + listPatchJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listPatchJobsCallable()"); + } + + public UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPatchJobInstanceDetailsPagedCallable()"); + } + + public UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetailsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPatchJobInstanceDetailsCallable()"); + } + + public UnaryCallable< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: createPatchDeploymentCallable()"); + } + + public UnaryCallable + getPatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: getPatchDeploymentCallable()"); + } + + public UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, ListPatchDeploymentsPagedResponse> + listPatchDeploymentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPatchDeploymentsPagedCallable()"); + } + + public UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeploymentsCallable() { + throw new UnsupportedOperationException("Not implemented: listPatchDeploymentsCallable()"); + } + + public UnaryCallable + deletePatchDeploymentCallable() { + throw new UnsupportedOperationException("Not implemented: deletePatchDeploymentCallable()"); + } + + public UnaryCallable + createGuestPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: createGuestPolicyCallable()"); + } + + public UnaryCallable + getGuestPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getGuestPolicyCallable()"); + } + + public UnaryCallable + listGuestPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listGuestPoliciesPagedCallable()"); + } + + public UnaryCallable< + GuestPolicies.ListGuestPoliciesRequest, GuestPolicies.ListGuestPoliciesResponse> + listGuestPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: listGuestPoliciesCallable()"); + } + + public UnaryCallable + updateGuestPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: updateGuestPolicyCallable()"); + } + + public UnaryCallable deleteGuestPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteGuestPolicyCallable()"); + } + + public UnaryCallable< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: lookupEffectiveGuestPolicyCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java new file mode 100644 index 00000000..531633fc --- /dev/null +++ b/google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java @@ -0,0 +1,1029 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta.stub; + +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.osconfig.v1beta.GuestPolicies; +import com.google.cloud.osconfig.v1beta.PatchDeployments; +import com.google.cloud.osconfig.v1beta.PatchJobs; +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: + * + *

{@code
+ * OsConfigServiceStubSettings.Builder osConfigServiceSettingsBuilder =
+ *     OsConfigServiceStubSettings.newBuilder();
+ * osConfigServiceSettingsBuilder
+ *     .executePatchJobSettings()
+ *     .setRetrySettings(
+ *         osConfigServiceSettingsBuilder
+ *             .executePatchJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * OsConfigServiceStubSettings osConfigServiceSettings = osConfigServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +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 PagedCallSettings< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + listPatchJobsSettings; + private final PagedCallSettings< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsSettings; + private final UnaryCallSettings< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentSettings; + private final UnaryCallSettings< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentSettings; + private final PagedCallSettings< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + listPatchDeploymentsSettings; + private final UnaryCallSettings + deletePatchDeploymentSettings; + private final UnaryCallSettings + createGuestPolicySettings; + private final UnaryCallSettings + getGuestPolicySettings; + private final PagedCallSettings< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + listGuestPoliciesSettings; + private final UnaryCallSettings + updateGuestPolicySettings; + private final UnaryCallSettings + deleteGuestPolicySettings; + private final UnaryCallSettings< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicySettings; + + private static final PagedListDescriptor< + PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse, PatchJobs.PatchJob> + LIST_PATCH_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + PatchJobs.PatchJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public PatchJobs.ListPatchJobsRequest injectToken( + PatchJobs.ListPatchJobsRequest payload, String token) { + return PatchJobs.ListPatchJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public PatchJobs.ListPatchJobsRequest injectPageSize( + PatchJobs.ListPatchJobsRequest payload, int pageSize) { + return PatchJobs.ListPatchJobsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(PatchJobs.ListPatchJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(PatchJobs.ListPatchJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + PatchJobs.ListPatchJobsResponse payload) { + return payload.getPatchJobsList() == null + ? ImmutableList.of() + : payload.getPatchJobsList(); + } + }; + + private static final PagedListDescriptor< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails> + LIST_PATCH_JOB_INSTANCE_DETAILS_PAGE_STR_DESC = + new PagedListDescriptor< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public PatchJobs.ListPatchJobInstanceDetailsRequest injectToken( + PatchJobs.ListPatchJobInstanceDetailsRequest payload, String token) { + return PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public PatchJobs.ListPatchJobInstanceDetailsRequest injectPageSize( + PatchJobs.ListPatchJobInstanceDetailsRequest payload, int pageSize) { + return PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(PatchJobs.ListPatchJobInstanceDetailsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(PatchJobs.ListPatchJobInstanceDetailsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + PatchJobs.ListPatchJobInstanceDetailsResponse payload) { + return payload.getPatchJobInstanceDetailsList() == null + ? ImmutableList.of() + : payload.getPatchJobInstanceDetailsList(); + } + }; + + private static final PagedListDescriptor< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment> + LIST_PATCH_DEPLOYMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public PatchDeployments.ListPatchDeploymentsRequest injectToken( + PatchDeployments.ListPatchDeploymentsRequest payload, String token) { + return PatchDeployments.ListPatchDeploymentsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public PatchDeployments.ListPatchDeploymentsRequest injectPageSize( + PatchDeployments.ListPatchDeploymentsRequest payload, int pageSize) { + return PatchDeployments.ListPatchDeploymentsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(PatchDeployments.ListPatchDeploymentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(PatchDeployments.ListPatchDeploymentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + PatchDeployments.ListPatchDeploymentsResponse payload) { + return payload.getPatchDeploymentsList() == null + ? ImmutableList.of() + : payload.getPatchDeploymentsList(); + } + }; + + private static final PagedListDescriptor< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy> + LIST_GUEST_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public GuestPolicies.ListGuestPoliciesRequest injectToken( + GuestPolicies.ListGuestPoliciesRequest payload, String token) { + return GuestPolicies.ListGuestPoliciesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public GuestPolicies.ListGuestPoliciesRequest injectPageSize( + GuestPolicies.ListGuestPoliciesRequest payload, int pageSize) { + return GuestPolicies.ListGuestPoliciesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(GuestPolicies.ListGuestPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(GuestPolicies.ListGuestPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + GuestPolicies.ListGuestPoliciesResponse payload) { + return payload.getGuestPoliciesList() == null + ? ImmutableList.of() + : payload.getGuestPoliciesList(); + } + }; + + private static final PagedListResponseFactory< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + LIST_PATCH_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + PatchJobs.ListPatchJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + PatchJobs.PatchJob> + pageContext = + PageContext.create(callable, LIST_PATCH_JOBS_PAGE_STR_DESC, request, context); + return ListPatchJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + LIST_PATCH_JOB_INSTANCE_DETAILS_PAGE_STR_FACT = + new PagedListResponseFactory< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse> + callable, + PatchJobs.ListPatchJobInstanceDetailsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + PatchJobs.PatchJobInstanceDetails> + pageContext = + PageContext.create( + callable, + LIST_PATCH_JOB_INSTANCE_DETAILS_PAGE_STR_DESC, + request, + context); + return ListPatchJobInstanceDetailsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + LIST_PATCH_DEPLOYMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse> + callable, + PatchDeployments.ListPatchDeploymentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + PatchDeployments.PatchDeployment> + pageContext = + PageContext.create( + callable, LIST_PATCH_DEPLOYMENTS_PAGE_STR_DESC, request, context); + return ListPatchDeploymentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + LIST_GUEST_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse> + callable, + GuestPolicies.ListGuestPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + GuestPolicies.GuestPolicy> + pageContext = + PageContext.create( + callable, LIST_GUEST_POLICIES_PAGE_STR_DESC, request, context); + return ListGuestPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** 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 PagedCallSettings< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + listPatchJobsSettings() { + return listPatchJobsSettings; + } + + /** Returns the object with the settings used for calls to listPatchJobInstanceDetails. */ + public PagedCallSettings< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsSettings() { + return listPatchJobInstanceDetailsSettings; + } + + /** Returns the object with the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentSettings() { + return createPatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentSettings() { + return getPatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to listPatchDeployments. */ + public PagedCallSettings< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + listPatchDeploymentsSettings() { + return listPatchDeploymentsSettings; + } + + /** Returns the object with the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings + deletePatchDeploymentSettings() { + return deletePatchDeploymentSettings; + } + + /** Returns the object with the settings used for calls to createGuestPolicy. */ + public UnaryCallSettings + createGuestPolicySettings() { + return createGuestPolicySettings; + } + + /** Returns the object with the settings used for calls to getGuestPolicy. */ + public UnaryCallSettings + getGuestPolicySettings() { + return getGuestPolicySettings; + } + + /** Returns the object with the settings used for calls to listGuestPolicies. */ + public PagedCallSettings< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + listGuestPoliciesSettings() { + return listGuestPoliciesSettings; + } + + /** Returns the object with the settings used for calls to updateGuestPolicy. */ + public UnaryCallSettings + updateGuestPolicySettings() { + return updateGuestPolicySettings; + } + + /** Returns the object with the settings used for calls to deleteGuestPolicy. */ + public UnaryCallSettings + deleteGuestPolicySettings() { + return deleteGuestPolicySettings; + } + + /** Returns the object with the settings used for calls to lookupEffectiveGuestPolicy. */ + public UnaryCallSettings< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicySettings() { + return lookupEffectiveGuestPolicySettings; + } + + @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); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "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(); + createGuestPolicySettings = settingsBuilder.createGuestPolicySettings().build(); + getGuestPolicySettings = settingsBuilder.getGuestPolicySettings().build(); + listGuestPoliciesSettings = settingsBuilder.listGuestPoliciesSettings().build(); + updateGuestPolicySettings = settingsBuilder.updateGuestPolicySettings().build(); + deleteGuestPolicySettings = settingsBuilder.deleteGuestPolicySettings().build(); + lookupEffectiveGuestPolicySettings = + settingsBuilder.lookupEffectiveGuestPolicySettings().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 PagedCallSettings.Builder< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + listPatchJobsSettings; + private final PagedCallSettings.Builder< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsSettings; + private final UnaryCallSettings.Builder< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentSettings; + private final UnaryCallSettings.Builder< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentSettings; + private final PagedCallSettings.Builder< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + listPatchDeploymentsSettings; + private final UnaryCallSettings.Builder + deletePatchDeploymentSettings; + private final UnaryCallSettings.Builder< + GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> + createGuestPolicySettings; + private final UnaryCallSettings.Builder< + GuestPolicies.GetGuestPolicyRequest, GuestPolicies.GuestPolicy> + getGuestPolicySettings; + private final PagedCallSettings.Builder< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + listGuestPoliciesSettings; + private final UnaryCallSettings.Builder< + GuestPolicies.UpdateGuestPolicyRequest, GuestPolicies.GuestPolicy> + updateGuestPolicySettings; + private final UnaryCallSettings.Builder + deleteGuestPolicySettings; + private final UnaryCallSettings.Builder< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicySettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", 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 = PagedCallSettings.newBuilder(LIST_PATCH_JOBS_PAGE_STR_FACT); + listPatchJobInstanceDetailsSettings = + PagedCallSettings.newBuilder(LIST_PATCH_JOB_INSTANCE_DETAILS_PAGE_STR_FACT); + createPatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getPatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPatchDeploymentsSettings = + PagedCallSettings.newBuilder(LIST_PATCH_DEPLOYMENTS_PAGE_STR_FACT); + deletePatchDeploymentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listGuestPoliciesSettings = PagedCallSettings.newBuilder(LIST_GUEST_POLICIES_PAGE_STR_FACT); + updateGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + lookupEffectiveGuestPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + executePatchJobSettings, + getPatchJobSettings, + cancelPatchJobSettings, + listPatchJobsSettings, + listPatchJobInstanceDetailsSettings, + createPatchDeploymentSettings, + getPatchDeploymentSettings, + listPatchDeploymentsSettings, + deletePatchDeploymentSettings, + createGuestPolicySettings, + getGuestPolicySettings, + listGuestPoliciesSettings, + updateGuestPolicySettings, + deleteGuestPolicySettings, + lookupEffectiveGuestPolicySettings); + initDefaults(this); + } + + 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(); + createGuestPolicySettings = settings.createGuestPolicySettings.toBuilder(); + getGuestPolicySettings = settings.getGuestPolicySettings.toBuilder(); + listGuestPoliciesSettings = settings.listGuestPoliciesSettings.toBuilder(); + updateGuestPolicySettings = settings.updateGuestPolicySettings.toBuilder(); + deleteGuestPolicySettings = settings.deleteGuestPolicySettings.toBuilder(); + lookupEffectiveGuestPolicySettings = settings.lookupEffectiveGuestPolicySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + executePatchJobSettings, + getPatchJobSettings, + cancelPatchJobSettings, + listPatchJobsSettings, + listPatchJobInstanceDetailsSettings, + createPatchDeploymentSettings, + getPatchDeploymentSettings, + listPatchDeploymentsSettings, + deletePatchDeploymentSettings, + createGuestPolicySettings, + getGuestPolicySettings, + listGuestPoliciesSettings, + updateGuestPolicySettings, + deleteGuestPolicySettings, + lookupEffectiveGuestPolicySettings); + } + + 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("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPatchJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .cancelPatchJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPatchJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPatchJobInstanceDetailsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPatchDeploymentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePatchDeploymentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createGuestPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getGuestPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listGuestPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateGuestPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteGuestPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .lookupEffectiveGuestPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to 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 PagedCallSettings.Builder< + PatchJobs.ListPatchJobsRequest, + PatchJobs.ListPatchJobsResponse, + ListPatchJobsPagedResponse> + listPatchJobsSettings() { + return listPatchJobsSettings; + } + + /** Returns the builder for the settings used for calls to listPatchJobInstanceDetails. */ + public PagedCallSettings.Builder< + PatchJobs.ListPatchJobInstanceDetailsRequest, + PatchJobs.ListPatchJobInstanceDetailsResponse, + ListPatchJobInstanceDetailsPagedResponse> + listPatchJobInstanceDetailsSettings() { + return listPatchJobInstanceDetailsSettings; + } + + /** Returns the builder for the settings used for calls to createPatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.CreatePatchDeploymentRequest, PatchDeployments.PatchDeployment> + createPatchDeploymentSettings() { + return createPatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to getPatchDeployment. */ + public UnaryCallSettings.Builder< + PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment> + getPatchDeploymentSettings() { + return getPatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to listPatchDeployments. */ + public PagedCallSettings.Builder< + PatchDeployments.ListPatchDeploymentsRequest, + PatchDeployments.ListPatchDeploymentsResponse, + ListPatchDeploymentsPagedResponse> + listPatchDeploymentsSettings() { + return listPatchDeploymentsSettings; + } + + /** Returns the builder for the settings used for calls to deletePatchDeployment. */ + public UnaryCallSettings.Builder + deletePatchDeploymentSettings() { + return deletePatchDeploymentSettings; + } + + /** Returns the builder for the settings used for calls to createGuestPolicy. */ + public UnaryCallSettings.Builder< + GuestPolicies.CreateGuestPolicyRequest, GuestPolicies.GuestPolicy> + createGuestPolicySettings() { + return createGuestPolicySettings; + } + + /** Returns the builder for the settings used for calls to getGuestPolicy. */ + public UnaryCallSettings.Builder + getGuestPolicySettings() { + return getGuestPolicySettings; + } + + /** Returns the builder for the settings used for calls to listGuestPolicies. */ + public PagedCallSettings.Builder< + GuestPolicies.ListGuestPoliciesRequest, + GuestPolicies.ListGuestPoliciesResponse, + ListGuestPoliciesPagedResponse> + listGuestPoliciesSettings() { + return listGuestPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to updateGuestPolicy. */ + public UnaryCallSettings.Builder< + GuestPolicies.UpdateGuestPolicyRequest, GuestPolicies.GuestPolicy> + updateGuestPolicySettings() { + return updateGuestPolicySettings; + } + + /** Returns the builder for the settings used for calls to deleteGuestPolicy. */ + public UnaryCallSettings.Builder + deleteGuestPolicySettings() { + return deleteGuestPolicySettings; + } + + /** Returns the builder for the settings used for calls to lookupEffectiveGuestPolicy. */ + public UnaryCallSettings.Builder< + GuestPolicies.LookupEffectiveGuestPolicyRequest, GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicySettings() { + return lookupEffectiveGuestPolicySettings; + } + + @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/OsConfigServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/OsConfigServiceClientTest.java index 2489fe11..0d9cff6b 100644 --- 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 @@ -31,6 +31,7 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Duration; import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.Arrays; @@ -84,16 +85,37 @@ public void tearDown() throws Exception { @Test public void executePatchJobTest() throws Exception { - PatchJobs.PatchJob expectedResponse = PatchJobs.PatchJob.newBuilder().build(); + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName(PatchJobName.of("[PROJECT]", "[PATCH_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment( + PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); PatchJobs.ExecutePatchJobRequest request = PatchJobs.ExecutePatchJobRequest.newBuilder() .setParent(ProjectName.of("[PROJECT]").toString()) .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) .setDuration(Duration.newBuilder().build()) .setDryRun(true) .setDisplayName("displayName1714148973") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); PatchJobs.PatchJob actualResponse = client.executePatchJob(request); @@ -128,9 +150,12 @@ public void executePatchJobExceptionTest() throws Exception { PatchJobs.ExecutePatchJobRequest.newBuilder() .setParent(ProjectName.of("[PROJECT]").toString()) .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) .setDuration(Duration.newBuilder().build()) .setDryRun(true) .setDisplayName("displayName1714148973") + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) .build(); client.executePatchJob(request); Assert.fail("No exception raised"); @@ -141,7 +166,25 @@ public void executePatchJobExceptionTest() throws Exception { @Test public void getPatchJobTest() throws Exception { - PatchJobs.PatchJob expectedResponse = PatchJobs.PatchJob.newBuilder().build(); + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName(PatchJobName.of("[PROJECT]", "[PATCH_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment( + PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); PatchJobName name = PatchJobName.of("[PROJECT]", "[PATCH_JOB]"); @@ -177,7 +220,25 @@ public void getPatchJobExceptionTest() throws Exception { @Test public void getPatchJobTest2() throws Exception { - PatchJobs.PatchJob expectedResponse = PatchJobs.PatchJob.newBuilder().build(); + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName(PatchJobName.of("[PROJECT]", "[PATCH_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment( + PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); String name = "name3373707"; @@ -213,7 +274,25 @@ public void getPatchJobExceptionTest2() throws Exception { @Test public void cancelPatchJobTest() throws Exception { - PatchJobs.PatchJob expectedResponse = PatchJobs.PatchJob.newBuilder().build(); + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName(PatchJobName.of("[PROJECT]", "[PATCH_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment( + PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); PatchJobs.CancelPatchJobRequest request = @@ -442,7 +521,17 @@ public void listPatchJobInstanceDetailsExceptionTest2() throws Exception { @Test public void createPatchDeploymentTest() throws Exception { PatchDeployments.PatchDeployment expectedResponse = - PatchDeployments.PatchDeployment.newBuilder().build(); + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); ProjectName parent = ProjectName.of("[PROJECT]"); @@ -488,7 +577,17 @@ public void createPatchDeploymentExceptionTest() throws Exception { @Test public void createPatchDeploymentTest2() throws Exception { PatchDeployments.PatchDeployment expectedResponse = - PatchDeployments.PatchDeployment.newBuilder().build(); + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); String parent = "parent-995424086"; @@ -534,7 +633,17 @@ public void createPatchDeploymentExceptionTest2() throws Exception { @Test public void getPatchDeploymentTest() throws Exception { PatchDeployments.PatchDeployment expectedResponse = - PatchDeployments.PatchDeployment.newBuilder().build(); + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); PatchDeploymentName name = PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]"); @@ -571,7 +680,17 @@ public void getPatchDeploymentExceptionTest() throws Exception { @Test public void getPatchDeploymentTest2() throws Exception { PatchDeployments.PatchDeployment expectedResponse = - PatchDeployments.PatchDeployment.newBuilder().build(); + PatchDeployments.PatchDeployment.newBuilder() + .setName(PatchDeploymentName.of("[PROJECT]", "[PATCH_DEPLOYMENT]").toString()) + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .setRollout(PatchJobs.PatchRollout.newBuilder().build()) + .build(); mockOsConfigService.addResponse(expectedResponse); String name = "name3373707"; diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/it/ITSystemTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/it/ITSystemTest.java deleted file mode 100644 index d2bc7803..00000000 --- a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1/it/ITSystemTest.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.osconfig.v1.it; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import com.google.api.core.ApiFuture; -import com.google.cloud.ServiceOptions; -import com.google.cloud.osconfig.v1.OsConfigServiceClient; -import com.google.cloud.osconfig.v1.PatchDeploymentName; -import com.google.cloud.osconfig.v1.PatchDeployments; -import com.google.cloud.osconfig.v1.PatchJobs; -import com.google.cloud.osconfig.v1.ProjectName; -import com.google.common.collect.Lists; -import com.google.type.TimeOfDay; -import com.google.type.TimeZone; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.threeten.bp.ZoneId; - -public class ITSystemTest { - - private static OsConfigServiceClient client; - - private static final String PROJECT = ServiceOptions.getDefaultProjectId(); - private static final String ID = UUID.randomUUID().toString(); - private static final String DESCRIPTION = "description"; - private static final String PATCH_DEPLOYMENT_ID = "pd" + ID.substring(0, 3); - private static final PatchDeploymentName PATCH_DEPLOYMENT_NAME = - PatchDeploymentName.of(PROJECT, PATCH_DEPLOYMENT_ID); - private static final ProjectName PARENT = ProjectName.of(PROJECT); - private static final PatchJobs.PatchInstanceFilter PATCH_INSTANCE_FILTER = - PatchJobs.PatchInstanceFilter.newBuilder().setAll(true).build(); - private static final TimeZone TIME_ZONE = - TimeZone.newBuilder().setId(ZoneId.systemDefault().getId()).build(); - private static final PatchDeployments.RecurringSchedule.Frequency FREQUENCY = - PatchDeployments.RecurringSchedule.Frequency.MONTHLY; - private static final PatchDeployments.MonthlySchedule MONTHLY_SCHEDULE = - PatchDeployments.MonthlySchedule.newBuilder().setMonthDay(1).build(); - private static final TimeOfDay TIME_OF_DAY = TimeOfDay.newBuilder().setHours(1).build(); - private static final PatchDeployments.RecurringSchedule RECURRING_SCHEDULE = - PatchDeployments.RecurringSchedule.newBuilder() - .setFrequency(FREQUENCY) - .setTimeOfDay(TIME_OF_DAY) - .setTimeZone(TIME_ZONE) - .setMonthly(MONTHLY_SCHEDULE) - .build(); - - @BeforeClass - public static void setUp() throws IOException { - client = OsConfigServiceClient.create(); - PatchDeployments.PatchDeployment patchDeployment = - PatchDeployments.PatchDeployment.newBuilder() - .setName(PATCH_DEPLOYMENT_NAME.toString()) - .setInstanceFilter(PATCH_INSTANCE_FILTER) - .setRecurringSchedule(RECURRING_SCHEDULE) - .setDescription(DESCRIPTION) - .build(); - PatchDeployments.CreatePatchDeploymentRequest request = - PatchDeployments.CreatePatchDeploymentRequest.newBuilder() - .setParent(PARENT.toString()) - .setPatchDeployment(patchDeployment) - .setPatchDeploymentId(PATCH_DEPLOYMENT_ID) - .build(); - client.createPatchDeployment(request); - } - - @AfterClass - public static void tearDown() { - PatchDeployments.DeletePatchDeploymentRequest request = - PatchDeployments.DeletePatchDeploymentRequest.newBuilder() - .setName(PATCH_DEPLOYMENT_NAME.toString()) - .build(); - client.deletePatchDeployment(request); - client.close(); - } - - @Test - public void getPatchDeploymentTest() { - PatchDeployments.GetPatchDeploymentRequest getPatchDeploymentRequest = - PatchDeployments.GetPatchDeploymentRequest.newBuilder() - .setName(PATCH_DEPLOYMENT_NAME.toString()) - .build(); - PatchDeployments.PatchDeployment response = - client.getPatchDeployment(getPatchDeploymentRequest); - assertEquals(PATCH_INSTANCE_FILTER, response.getInstanceFilter()); - assertEquals(DESCRIPTION, response.getDescription()); - assertNotNull(response.getRecurringSchedule()); - assertEquals(TIME_ZONE, response.getRecurringSchedule().getTimeZone()); - assertEquals(TIME_OF_DAY, response.getRecurringSchedule().getTimeOfDay()); - assertEquals(FREQUENCY, response.getRecurringSchedule().getFrequency()); - assertEquals(MONTHLY_SCHEDULE, response.getRecurringSchedule().getMonthly()); - assertNotNull(response.getCreateTime()); - } - - @Test - public void listPatchDeploymentsTest() { - PatchDeployments.ListPatchDeploymentsRequest request = - PatchDeployments.ListPatchDeploymentsRequest.newBuilder() - .setParent(PARENT.toString()) - .build(); - ArrayList patchDeployments = - Lists.newArrayList(client.listPatchDeployments(request).iterateAll()); - assertEquals(1, patchDeployments.size()); - assertEquals(PATCH_INSTANCE_FILTER, patchDeployments.get(0).getInstanceFilter()); - assertEquals(DESCRIPTION, patchDeployments.get(0).getDescription()); - assertNotNull(patchDeployments.get(0).getRecurringSchedule()); - assertEquals(TIME_ZONE, patchDeployments.get(0).getRecurringSchedule().getTimeZone()); - assertEquals(TIME_OF_DAY, patchDeployments.get(0).getRecurringSchedule().getTimeOfDay()); - assertEquals(FREQUENCY, patchDeployments.get(0).getRecurringSchedule().getFrequency()); - assertEquals(MONTHLY_SCHEDULE, patchDeployments.get(0).getRecurringSchedule().getMonthly()); - assertNotNull(patchDeployments.get(0).getCreateTime()); - } - - @Test - public void patchJobTest() throws ExecutionException, InterruptedException { - String patchJobDisplayName = "patch-job-test-" + ID; - PatchJobs.ExecutePatchJobRequest request = - PatchJobs.ExecutePatchJobRequest.newBuilder() - .setDisplayName(patchJobDisplayName) - .setParent(PARENT.toString()) - .setInstanceFilter(PATCH_INSTANCE_FILTER) - .build(); - ApiFuture future = client.executePatchJobCallable().futureCall(request); - PatchJobs.PatchJob response = future.get(); - assertNotNull(response); - assertNotNull(response.getCreateTime()); - assertNotNull(response.getUpdateTime()); - assertEquals(PatchJobs.PatchJob.State.STARTED, response.getState()); - assertEquals(PATCH_INSTANCE_FILTER, response.getInstanceFilter()); - assertEquals(patchJobDisplayName, response.getDisplayName()); - - // Get PatchJob - PatchJobs.GetPatchJobRequest getPatchJobRequest = - PatchJobs.GetPatchJobRequest.newBuilder().setName(response.getName()).build(); - PatchJobs.PatchJob patchJob = client.getPatchJob(getPatchJobRequest); - comparePatchJob(response, patchJob); - - // List PatchJob - PatchJobs.ListPatchJobsRequest listPatchJobsRequest = - PatchJobs.ListPatchJobsRequest.newBuilder().setParent(PARENT.toString()).build(); - List patchJobs = - Lists.newArrayList(client.listPatchJobs(listPatchJobsRequest).iterateAll()); - for (PatchJobs.PatchJob job : patchJobs) { - if (job.getName().equals(response.getName())) comparePatchJob(job, response); - } - - // CancelPatchJob - PatchJobs.CancelPatchJobRequest cancelPatchJobRequest = - PatchJobs.CancelPatchJobRequest.newBuilder().setName(response.getName()).build(); - PatchJobs.PatchJob cancelPatchJob = client.cancelPatchJob(cancelPatchJobRequest); - assertEquals(PatchJobs.PatchJob.State.CANCELED, cancelPatchJob.getState()); - } - - @Test - public void listPatchJobInstanceDetailsTest() throws ExecutionException, InterruptedException { - String patchJobDisplayName = "patch-job-" + ID; - PatchJobs.ExecutePatchJobRequest request = - PatchJobs.ExecutePatchJobRequest.newBuilder() - .setDisplayName(patchJobDisplayName) - .setParent(PARENT.toString()) - .setPatchConfig(PatchJobs.PatchConfig.newBuilder().setRebootConfigValue(1).build()) - .setInstanceFilter(PATCH_INSTANCE_FILTER) - .build(); - ApiFuture future = client.executePatchJobCallable().futureCall(request); - PatchJobs.PatchJob response = future.get(); - assertNotNull(response); - assertNotNull(response.getCreateTime()); - assertNotNull(response.getUpdateTime()); - assertEquals(PatchJobs.PatchJob.State.STARTED, response.getState()); - assertEquals(PATCH_INSTANCE_FILTER, response.getInstanceFilter()); - assertEquals(patchJobDisplayName, response.getDisplayName()); - - // List PatchJob Instance Details - PatchJobs.ListPatchJobInstanceDetailsRequest listPatchJobInstanceDetailsRequest = - PatchJobs.ListPatchJobInstanceDetailsRequest.newBuilder() - .setParent(response.getName()) - .build(); - List patchJobsDetails = - Lists.newArrayList( - client.listPatchJobInstanceDetails(listPatchJobInstanceDetailsRequest).iterateAll()); - assertTrue(patchJobsDetails.size() >= 0); - - // Cancel PatchJob - PatchJobs.CancelPatchJobRequest cancelPatchJobRequest = - PatchJobs.CancelPatchJobRequest.newBuilder().setName(response.getName()).build(); - PatchJobs.PatchJob cancelPatchJob = client.cancelPatchJob(cancelPatchJobRequest); - assertEquals(PatchJobs.PatchJob.State.CANCELED, cancelPatchJob.getState()); - } - - private void comparePatchJob(PatchJobs.PatchJob expected, PatchJobs.PatchJob value) { - assertEquals(expected.getName(), value.getName()); - assertEquals(expected.getCreateTime(), value.getCreateTime()); - assertEquals(expected.getUpdateTime(), value.getUpdateTime()); - assertEquals(expected.getState(), value.getState()); - assertEquals(expected.getPatchConfig(), value.getPatchConfig()); - assertEquals(expected.getInstanceFilter(), value.getInstanceFilter()); - assertEquals(expected.getPatchDeployment(), value.getPatchDeployment()); - assertEquals(expected.getDisplayName(), value.getDisplayName()); - } -} diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalService.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalService.java new file mode 100644 index 00000000..b9a306cc --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockOsConfigZonalService implements MockGrpcService { + private final MockOsConfigZonalServiceImpl serviceImpl; + + public MockOsConfigZonalService() { + serviceImpl = new MockOsConfigZonalServiceImpl(); + } + + @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/v1alpha/MockOsConfigZonalServiceImpl.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java new file mode 100644 index 00000000..8e2faf95 --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/MockOsConfigZonalServiceImpl.java @@ -0,0 +1,318 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.core.BetaApi; +import com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceGrpc.OsConfigZonalServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockOsConfigZonalServiceImpl extends OsConfigZonalServiceImplBase { + private List requests; + private Queue responses; + + public MockOsConfigZonalServiceImpl() { + 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 createOSPolicyAssignment( + CreateOSPolicyAssignmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateOSPolicyAssignment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateOSPolicyAssignment( + UpdateOSPolicyAssignmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateOSPolicyAssignment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getOSPolicyAssignment( + GetOSPolicyAssignmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof OSPolicyAssignment) { + requests.add(request); + responseObserver.onNext(((OSPolicyAssignment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetOSPolicyAssignment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + OSPolicyAssignment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listOSPolicyAssignments( + ListOSPolicyAssignmentsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOSPolicyAssignmentsResponse) { + requests.add(request); + responseObserver.onNext(((ListOSPolicyAssignmentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListOSPolicyAssignments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOSPolicyAssignmentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listOSPolicyAssignmentRevisions( + ListOSPolicyAssignmentRevisionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListOSPolicyAssignmentRevisionsResponse) { + requests.add(request); + responseObserver.onNext(((ListOSPolicyAssignmentRevisionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListOSPolicyAssignmentRevisions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListOSPolicyAssignmentRevisionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteOSPolicyAssignment( + DeleteOSPolicyAssignmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteOSPolicyAssignment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstanceOSPoliciesCompliance( + GetInstanceOSPoliciesComplianceRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InstanceOSPoliciesCompliance) { + requests.add(request); + responseObserver.onNext(((InstanceOSPoliciesCompliance) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInstanceOSPoliciesCompliance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InstanceOSPoliciesCompliance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstanceOSPoliciesCompliances( + ListInstanceOSPoliciesCompliancesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstanceOSPoliciesCompliancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstanceOSPoliciesCompliancesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInstanceOSPoliciesCompliances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstanceOSPoliciesCompliancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInventory( + GetInventoryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Inventory) { + requests.add(request); + responseObserver.onNext(((Inventory) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInventory, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Inventory.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInventories( + ListInventoriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInventoriesResponse) { + requests.add(request); + responseObserver.onNext(((ListInventoriesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInventories, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInventoriesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getVulnerabilityReport( + GetVulnerabilityReportRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof VulnerabilityReport) { + requests.add(request); + responseObserver.onNext(((VulnerabilityReport) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetVulnerabilityReport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + VulnerabilityReport.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listVulnerabilityReports( + ListVulnerabilityReportsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListVulnerabilityReportsResponse) { + requests.add(request); + responseObserver.onNext(((ListVulnerabilityReportsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListVulnerabilityReports, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListVulnerabilityReportsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java new file mode 100644 index 00000000..65ed270e --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClientTest.java @@ -0,0 +1,1212 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInstanceOSPoliciesCompliancesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListInventoriesPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentRevisionsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListOSPolicyAssignmentsPagedResponse; +import static com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceClient.ListVulnerabilityReportsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class OsConfigZonalServiceClientTest { + private static MockOsConfigZonalService mockOsConfigZonalService; + private static MockServiceHelper mockServiceHelper; + private OsConfigZonalServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockOsConfigZonalService = new MockOsConfigZonalService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockOsConfigZonalService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + OsConfigZonalServiceSettings settings = + OsConfigZonalServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = OsConfigZonalServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createOSPolicyAssignmentTest() throws Exception { + OSPolicyAssignment expectedResponse = + OSPolicyAssignment.newBuilder() + .setName( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .setDescription("description-1724546052") + .addAllOsPolicies(new ArrayList()) + .setInstanceFilter(OSPolicyAssignment.InstanceFilter.newBuilder().build()) + .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) + .setRevisionId("revisionId-1507445162") + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setBaseline(true) + .setDeleted(true) + .setReconciling(true) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOSPolicyAssignmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockOsConfigZonalService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build(); + String osPolicyAssignmentId = "osPolicyAssignmentId-44079074"; + + OSPolicyAssignment actualResponse = + client + .createOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOSPolicyAssignmentRequest actualRequest = + ((CreateOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(osPolicyAssignment, actualRequest.getOsPolicyAssignment()); + Assert.assertEquals(osPolicyAssignmentId, actualRequest.getOsPolicyAssignmentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOSPolicyAssignmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build(); + String osPolicyAssignmentId = "osPolicyAssignmentId-44079074"; + client.createOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createOSPolicyAssignmentTest2() throws Exception { + OSPolicyAssignment expectedResponse = + OSPolicyAssignment.newBuilder() + .setName( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .setDescription("description-1724546052") + .addAllOsPolicies(new ArrayList()) + .setInstanceFilter(OSPolicyAssignment.InstanceFilter.newBuilder().build()) + .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) + .setRevisionId("revisionId-1507445162") + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setBaseline(true) + .setDeleted(true) + .setReconciling(true) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createOSPolicyAssignmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockOsConfigZonalService.addResponse(resultOperation); + + String parent = "parent-995424086"; + OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build(); + String osPolicyAssignmentId = "osPolicyAssignmentId-44079074"; + + OSPolicyAssignment actualResponse = + client + .createOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateOSPolicyAssignmentRequest actualRequest = + ((CreateOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(osPolicyAssignment, actualRequest.getOsPolicyAssignment()); + Assert.assertEquals(osPolicyAssignmentId, actualRequest.getOsPolicyAssignmentId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createOSPolicyAssignmentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String parent = "parent-995424086"; + OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build(); + String osPolicyAssignmentId = "osPolicyAssignmentId-44079074"; + client.createOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateOSPolicyAssignmentTest() throws Exception { + OSPolicyAssignment expectedResponse = + OSPolicyAssignment.newBuilder() + .setName( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .setDescription("description-1724546052") + .addAllOsPolicies(new ArrayList()) + .setInstanceFilter(OSPolicyAssignment.InstanceFilter.newBuilder().build()) + .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) + .setRevisionId("revisionId-1507445162") + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setBaseline(true) + .setDeleted(true) + .setReconciling(true) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateOSPolicyAssignmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockOsConfigZonalService.addResponse(resultOperation); + + OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + OSPolicyAssignment actualResponse = + client.updateOSPolicyAssignmentAsync(osPolicyAssignment, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOSPolicyAssignmentRequest actualRequest = + ((UpdateOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(osPolicyAssignment, actualRequest.getOsPolicyAssignment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOSPolicyAssignmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + OSPolicyAssignment osPolicyAssignment = OSPolicyAssignment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOSPolicyAssignmentAsync(osPolicyAssignment, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getOSPolicyAssignmentTest() throws Exception { + OSPolicyAssignment expectedResponse = + OSPolicyAssignment.newBuilder() + .setName( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .setDescription("description-1724546052") + .addAllOsPolicies(new ArrayList()) + .setInstanceFilter(OSPolicyAssignment.InstanceFilter.newBuilder().build()) + .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) + .setRevisionId("revisionId-1507445162") + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setBaseline(true) + .setDeleted(true) + .setReconciling(true) + .setUid("uid115792") + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + OSPolicyAssignmentName name = + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"); + + OSPolicyAssignment actualResponse = client.getOSPolicyAssignment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOSPolicyAssignmentRequest actualRequest = + ((GetOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOSPolicyAssignmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + OSPolicyAssignmentName name = + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"); + client.getOSPolicyAssignment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOSPolicyAssignmentTest2() throws Exception { + OSPolicyAssignment expectedResponse = + OSPolicyAssignment.newBuilder() + .setName( + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]") + .toString()) + .setDescription("description-1724546052") + .addAllOsPolicies(new ArrayList()) + .setInstanceFilter(OSPolicyAssignment.InstanceFilter.newBuilder().build()) + .setRollout(OSPolicyAssignment.Rollout.newBuilder().build()) + .setRevisionId("revisionId-1507445162") + .setRevisionCreateTime(Timestamp.newBuilder().build()) + .setBaseline(true) + .setDeleted(true) + .setReconciling(true) + .setUid("uid115792") + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String name = "name3373707"; + + OSPolicyAssignment actualResponse = client.getOSPolicyAssignment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOSPolicyAssignmentRequest actualRequest = + ((GetOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOSPolicyAssignmentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.getOSPolicyAssignment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOSPolicyAssignmentsTest() throws Exception { + OSPolicyAssignment responsesElement = OSPolicyAssignment.newBuilder().build(); + ListOSPolicyAssignmentsResponse expectedResponse = + ListOSPolicyAssignmentsResponse.newBuilder() + .setNextPageToken("") + .addAllOsPolicyAssignments(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListOSPolicyAssignmentsPagedResponse pagedListResponse = client.listOSPolicyAssignments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOsPolicyAssignmentsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOSPolicyAssignmentsRequest actualRequest = + ((ListOSPolicyAssignmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOSPolicyAssignmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listOSPolicyAssignments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOSPolicyAssignmentsTest2() throws Exception { + OSPolicyAssignment responsesElement = OSPolicyAssignment.newBuilder().build(); + ListOSPolicyAssignmentsResponse expectedResponse = + ListOSPolicyAssignmentsResponse.newBuilder() + .setNextPageToken("") + .addAllOsPolicyAssignments(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListOSPolicyAssignmentsPagedResponse pagedListResponse = client.listOSPolicyAssignments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOsPolicyAssignmentsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOSPolicyAssignmentsRequest actualRequest = + ((ListOSPolicyAssignmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOSPolicyAssignmentsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listOSPolicyAssignments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOSPolicyAssignmentRevisionsTest() throws Exception { + OSPolicyAssignment responsesElement = OSPolicyAssignment.newBuilder().build(); + ListOSPolicyAssignmentRevisionsResponse expectedResponse = + ListOSPolicyAssignmentRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllOsPolicyAssignments(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + OSPolicyAssignmentName name = + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"); + + ListOSPolicyAssignmentRevisionsPagedResponse pagedListResponse = + client.listOSPolicyAssignmentRevisions(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOsPolicyAssignmentsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOSPolicyAssignmentRevisionsRequest actualRequest = + ((ListOSPolicyAssignmentRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOSPolicyAssignmentRevisionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + OSPolicyAssignmentName name = + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"); + client.listOSPolicyAssignmentRevisions(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOSPolicyAssignmentRevisionsTest2() throws Exception { + OSPolicyAssignment responsesElement = OSPolicyAssignment.newBuilder().build(); + ListOSPolicyAssignmentRevisionsResponse expectedResponse = + ListOSPolicyAssignmentRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllOsPolicyAssignments(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String name = "name3373707"; + + ListOSPolicyAssignmentRevisionsPagedResponse pagedListResponse = + client.listOSPolicyAssignmentRevisions(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOsPolicyAssignmentsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOSPolicyAssignmentRevisionsRequest actualRequest = + ((ListOSPolicyAssignmentRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOSPolicyAssignmentRevisionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.listOSPolicyAssignmentRevisions(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteOSPolicyAssignmentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOSPolicyAssignmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockOsConfigZonalService.addResponse(resultOperation); + + OSPolicyAssignmentName name = + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"); + + client.deleteOSPolicyAssignmentAsync(name).get(); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOSPolicyAssignmentRequest actualRequest = + ((DeleteOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOSPolicyAssignmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + OSPolicyAssignmentName name = + OSPolicyAssignmentName.of("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"); + client.deleteOSPolicyAssignmentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteOSPolicyAssignmentTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteOSPolicyAssignmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockOsConfigZonalService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteOSPolicyAssignmentAsync(name).get(); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteOSPolicyAssignmentRequest actualRequest = + ((DeleteOSPolicyAssignmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteOSPolicyAssignmentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.deleteOSPolicyAssignmentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getInstanceOSPoliciesComplianceTest() throws Exception { + InstanceOSPoliciesCompliance expectedResponse = + InstanceOSPoliciesCompliance.newBuilder() + .setName( + InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]") + .toString()) + .setInstance("instance555127957") + .setState(OSPolicyComplianceState.forNumber(0)) + .setDetailedState("detailedState1829498305") + .setDetailedStateReason("detailedStateReason-790407323") + .addAllOsPolicyCompliances( + new ArrayList()) + .setLastComplianceCheckTime(Timestamp.newBuilder().build()) + .setLastComplianceRunId("lastComplianceRunId168782901") + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + InstanceOSPoliciesComplianceName name = + InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + InstanceOSPoliciesCompliance actualResponse = client.getInstanceOSPoliciesCompliance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceOSPoliciesComplianceRequest actualRequest = + ((GetInstanceOSPoliciesComplianceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceOSPoliciesComplianceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + InstanceOSPoliciesComplianceName name = + InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstanceOSPoliciesCompliance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceOSPoliciesComplianceTest2() throws Exception { + InstanceOSPoliciesCompliance expectedResponse = + InstanceOSPoliciesCompliance.newBuilder() + .setName( + InstanceOSPoliciesComplianceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]") + .toString()) + .setInstance("instance555127957") + .setState(OSPolicyComplianceState.forNumber(0)) + .setDetailedState("detailedState1829498305") + .setDetailedStateReason("detailedStateReason-790407323") + .addAllOsPolicyCompliances( + new ArrayList()) + .setLastComplianceCheckTime(Timestamp.newBuilder().build()) + .setLastComplianceRunId("lastComplianceRunId168782901") + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String name = "name3373707"; + + InstanceOSPoliciesCompliance actualResponse = client.getInstanceOSPoliciesCompliance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceOSPoliciesComplianceRequest actualRequest = + ((GetInstanceOSPoliciesComplianceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceOSPoliciesComplianceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.getInstanceOSPoliciesCompliance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstanceOSPoliciesCompliancesTest() throws Exception { + InstanceOSPoliciesCompliance responsesElement = + InstanceOSPoliciesCompliance.newBuilder().build(); + ListInstanceOSPoliciesCompliancesResponse expectedResponse = + ListInstanceOSPoliciesCompliancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstanceOsPoliciesCompliances(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInstanceOSPoliciesCompliancesPagedResponse pagedListResponse = + client.listInstanceOSPoliciesCompliances(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getInstanceOsPoliciesCompliancesList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstanceOSPoliciesCompliancesRequest actualRequest = + ((ListInstanceOSPoliciesCompliancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstanceOSPoliciesCompliancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInstanceOSPoliciesCompliances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstanceOSPoliciesCompliancesTest2() throws Exception { + InstanceOSPoliciesCompliance responsesElement = + InstanceOSPoliciesCompliance.newBuilder().build(); + ListInstanceOSPoliciesCompliancesResponse expectedResponse = + ListInstanceOSPoliciesCompliancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstanceOsPoliciesCompliances(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstanceOSPoliciesCompliancesPagedResponse pagedListResponse = + client.listInstanceOSPoliciesCompliances(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getInstanceOsPoliciesCompliancesList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstanceOSPoliciesCompliancesRequest actualRequest = + ((ListInstanceOSPoliciesCompliancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstanceOSPoliciesCompliancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstanceOSPoliciesCompliances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInventoryTest() throws Exception { + Inventory expectedResponse = + Inventory.newBuilder() + .setName(InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setOsInfo(Inventory.OsInfo.newBuilder().build()) + .putAllItems(new HashMap()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + InventoryName name = InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Inventory actualResponse = client.getInventory(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInventoryRequest actualRequest = ((GetInventoryRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInventoryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + InventoryName name = InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInventory(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInventoryTest2() throws Exception { + Inventory expectedResponse = + Inventory.newBuilder() + .setName(InventoryName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setOsInfo(Inventory.OsInfo.newBuilder().build()) + .putAllItems(new HashMap()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String name = "name3373707"; + + Inventory actualResponse = client.getInventory(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInventoryRequest actualRequest = ((GetInventoryRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInventoryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.getInventory(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInventoriesTest() throws Exception { + Inventory responsesElement = Inventory.newBuilder().build(); + ListInventoriesResponse expectedResponse = + ListInventoriesResponse.newBuilder() + .setNextPageToken("") + .addAllInventories(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ListInventoriesPagedResponse pagedListResponse = client.listInventories(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInventoriesList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInventoriesRequest actualRequest = ((ListInventoriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInventoriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.listInventories(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInventoriesTest2() throws Exception { + Inventory responsesElement = Inventory.newBuilder().build(); + ListInventoriesResponse expectedResponse = + ListInventoriesResponse.newBuilder() + .setNextPageToken("") + .addAllInventories(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInventoriesPagedResponse pagedListResponse = client.listInventories(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInventoriesList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInventoriesRequest actualRequest = ((ListInventoriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInventoriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInventories(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVulnerabilityReportTest() throws Exception { + VulnerabilityReport expectedResponse = + VulnerabilityReport.newBuilder() + .setName(VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .addAllVulnerabilities(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + VulnerabilityReportName name = + VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + VulnerabilityReport actualResponse = client.getVulnerabilityReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetVulnerabilityReportRequest actualRequest = + ((GetVulnerabilityReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getVulnerabilityReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + VulnerabilityReportName name = + VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getVulnerabilityReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getVulnerabilityReportTest2() throws Exception { + VulnerabilityReport expectedResponse = + VulnerabilityReport.newBuilder() + .setName(VulnerabilityReportName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .addAllVulnerabilities(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String name = "name3373707"; + + VulnerabilityReport actualResponse = client.getVulnerabilityReport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetVulnerabilityReportRequest actualRequest = + ((GetVulnerabilityReportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getVulnerabilityReportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String name = "name3373707"; + client.getVulnerabilityReport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listVulnerabilityReportsTest() throws Exception { + VulnerabilityReport responsesElement = VulnerabilityReport.newBuilder().build(); + ListVulnerabilityReportsResponse expectedResponse = + ListVulnerabilityReportsResponse.newBuilder() + .setNextPageToken("") + .addAllVulnerabilityReports(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ListVulnerabilityReportsPagedResponse pagedListResponse = + client.listVulnerabilityReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getVulnerabilityReportsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListVulnerabilityReportsRequest actualRequest = + ((ListVulnerabilityReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listVulnerabilityReportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.listVulnerabilityReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listVulnerabilityReportsTest2() throws Exception { + VulnerabilityReport responsesElement = VulnerabilityReport.newBuilder().build(); + ListVulnerabilityReportsResponse expectedResponse = + ListVulnerabilityReportsResponse.newBuilder() + .setNextPageToken("") + .addAllVulnerabilityReports(Arrays.asList(responsesElement)) + .build(); + mockOsConfigZonalService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListVulnerabilityReportsPagedResponse pagedListResponse = + client.listVulnerabilityReports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getVulnerabilityReportsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigZonalService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListVulnerabilityReportsRequest actualRequest = + ((ListVulnerabilityReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listVulnerabilityReportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigZonalService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listVulnerabilityReports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigService.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigService.java new file mode 100644 index 00000000..8bd6c410 --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class 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/v1beta/MockOsConfigServiceImpl.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java new file mode 100644 index 00000000..a2700b40 --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/MockOsConfigServiceImpl.java @@ -0,0 +1,389 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.osconfig.v1beta.OsConfigServiceGrpc.OsConfigServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class 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( + PatchJobs.ExecutePatchJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchJobs.PatchJob) { + requests.add(request); + responseObserver.onNext(((PatchJobs.PatchJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecutePatchJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchJobs.PatchJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPatchJob( + PatchJobs.GetPatchJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchJobs.PatchJob) { + requests.add(request); + responseObserver.onNext(((PatchJobs.PatchJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPatchJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchJobs.PatchJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelPatchJob( + PatchJobs.CancelPatchJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchJobs.PatchJob) { + requests.add(request); + responseObserver.onNext(((PatchJobs.PatchJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelPatchJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchJobs.PatchJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPatchJobs( + PatchJobs.ListPatchJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchJobs.ListPatchJobsResponse) { + requests.add(request); + responseObserver.onNext(((PatchJobs.ListPatchJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPatchJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchJobs.ListPatchJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPatchJobInstanceDetails( + PatchJobs.ListPatchJobInstanceDetailsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchJobs.ListPatchJobInstanceDetailsResponse) { + requests.add(request); + responseObserver.onNext(((PatchJobs.ListPatchJobInstanceDetailsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPatchJobInstanceDetails, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchJobs.ListPatchJobInstanceDetailsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPatchDeployment( + PatchDeployments.CreatePatchDeploymentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchDeployments.PatchDeployment) { + requests.add(request); + responseObserver.onNext(((PatchDeployments.PatchDeployment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePatchDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchDeployments.PatchDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPatchDeployment( + PatchDeployments.GetPatchDeploymentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchDeployments.PatchDeployment) { + requests.add(request); + responseObserver.onNext(((PatchDeployments.PatchDeployment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPatchDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchDeployments.PatchDeployment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPatchDeployments( + PatchDeployments.ListPatchDeploymentsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PatchDeployments.ListPatchDeploymentsResponse) { + requests.add(request); + responseObserver.onNext(((PatchDeployments.ListPatchDeploymentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPatchDeployments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PatchDeployments.ListPatchDeploymentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePatchDeployment( + PatchDeployments.DeletePatchDeploymentRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeletePatchDeployment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createGuestPolicy( + GuestPolicies.CreateGuestPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GuestPolicies.GuestPolicy) { + requests.add(request); + responseObserver.onNext(((GuestPolicies.GuestPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateGuestPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GuestPolicies.GuestPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getGuestPolicy( + GuestPolicies.GetGuestPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GuestPolicies.GuestPolicy) { + requests.add(request); + responseObserver.onNext(((GuestPolicies.GuestPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetGuestPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GuestPolicies.GuestPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listGuestPolicies( + GuestPolicies.ListGuestPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GuestPolicies.ListGuestPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((GuestPolicies.ListGuestPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListGuestPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GuestPolicies.ListGuestPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGuestPolicy( + GuestPolicies.UpdateGuestPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GuestPolicies.GuestPolicy) { + requests.add(request); + responseObserver.onNext(((GuestPolicies.GuestPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateGuestPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GuestPolicies.GuestPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteGuestPolicy( + GuestPolicies.DeleteGuestPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + 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( + String.format( + "Unrecognized response type %s for method DeleteGuestPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void lookupEffectiveGuestPolicy( + GuestPolicies.LookupEffectiveGuestPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GuestPolicies.EffectiveGuestPolicy) { + requests.add(request); + responseObserver.onNext(((GuestPolicies.EffectiveGuestPolicy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method LookupEffectiveGuestPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GuestPolicies.EffectiveGuestPolicy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java new file mode 100644 index 00000000..1be79304 --- /dev/null +++ b/google-cloud-os-config/src/test/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClientTest.java @@ -0,0 +1,1044 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListGuestPoliciesPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchDeploymentsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobInstanceDetailsPagedResponse; +import static com.google.cloud.osconfig.v1beta.OsConfigServiceClient.ListPatchJobsPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class OsConfigServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockOsConfigService mockOsConfigService; + private OsConfigServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockOsConfigService = new MockOsConfigService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockOsConfigService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + OsConfigServiceSettings settings = + OsConfigServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = OsConfigServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void executePatchJobTest() throws Exception { + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName("name3373707") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment("patchDeployment1500445997") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchJobs.ExecutePatchJobRequest request = + PatchJobs.ExecutePatchJobRequest.newBuilder() + .setParent("parent-995424086") + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setDryRun(true) + .setDisplayName("displayName1714148973") + .build(); + + PatchJobs.PatchJob actualResponse = client.executePatchJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchJobs.ExecutePatchJobRequest actualRequest = + ((PatchJobs.ExecutePatchJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getDescription(), actualRequest.getDescription()); + Assert.assertEquals(request.getInstanceFilter(), actualRequest.getInstanceFilter()); + Assert.assertEquals(request.getPatchConfig(), actualRequest.getPatchConfig()); + Assert.assertEquals(request.getDuration(), actualRequest.getDuration()); + Assert.assertEquals(request.getDryRun(), actualRequest.getDryRun()); + Assert.assertEquals(request.getDisplayName(), actualRequest.getDisplayName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void executePatchJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchJobs.ExecutePatchJobRequest request = + PatchJobs.ExecutePatchJobRequest.newBuilder() + .setParent("parent-995424086") + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setDryRun(true) + .setDisplayName("displayName1714148973") + .build(); + client.executePatchJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPatchJobTest() throws Exception { + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName("name3373707") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment("patchDeployment1500445997") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchJobs.GetPatchJobRequest request = + PatchJobs.GetPatchJobRequest.newBuilder().setName("name3373707").build(); + + PatchJobs.PatchJob actualResponse = client.getPatchJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchJobs.GetPatchJobRequest actualRequest = + ((PatchJobs.GetPatchJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPatchJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchJobs.GetPatchJobRequest request = + PatchJobs.GetPatchJobRequest.newBuilder().setName("name3373707").build(); + client.getPatchJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelPatchJobTest() throws Exception { + PatchJobs.PatchJob expectedResponse = + PatchJobs.PatchJob.newBuilder() + .setName("name3373707") + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setInstanceDetailsSummary( + PatchJobs.PatchJob.InstanceDetailsSummary.newBuilder().build()) + .setDryRun(true) + .setErrorMessage("errorMessage1203236063") + .setPercentComplete(-1960969229) + .setPatchDeployment("patchDeployment1500445997") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchJobs.CancelPatchJobRequest request = + PatchJobs.CancelPatchJobRequest.newBuilder().setName("name3373707").build(); + + PatchJobs.PatchJob actualResponse = client.cancelPatchJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchJobs.CancelPatchJobRequest actualRequest = + ((PatchJobs.CancelPatchJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelPatchJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchJobs.CancelPatchJobRequest request = + PatchJobs.CancelPatchJobRequest.newBuilder().setName("name3373707").build(); + client.cancelPatchJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPatchJobsTest() throws Exception { + PatchJobs.PatchJob responsesElement = PatchJobs.PatchJob.newBuilder().build(); + PatchJobs.ListPatchJobsResponse expectedResponse = + PatchJobs.ListPatchJobsResponse.newBuilder() + .setNextPageToken("") + .addAllPatchJobs(Arrays.asList(responsesElement)) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchJobs.ListPatchJobsRequest request = + PatchJobs.ListPatchJobsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + + ListPatchJobsPagedResponse pagedListResponse = client.listPatchJobs(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPatchJobsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchJobs.ListPatchJobsRequest actualRequest = + ((PatchJobs.ListPatchJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPatchJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchJobs.ListPatchJobsRequest request = + PatchJobs.ListPatchJobsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + client.listPatchJobs(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPatchJobInstanceDetailsTest() throws Exception { + PatchJobs.PatchJobInstanceDetails responsesElement = + PatchJobs.PatchJobInstanceDetails.newBuilder().build(); + PatchJobs.ListPatchJobInstanceDetailsResponse expectedResponse = + PatchJobs.ListPatchJobInstanceDetailsResponse.newBuilder() + .setNextPageToken("") + .addAllPatchJobInstanceDetails(Arrays.asList(responsesElement)) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPatchJobInstanceDetailsPagedResponse pagedListResponse = + client.listPatchJobInstanceDetails(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPatchJobInstanceDetailsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchJobs.ListPatchJobInstanceDetailsRequest actualRequest = + ((PatchJobs.ListPatchJobInstanceDetailsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPatchJobInstanceDetailsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPatchJobInstanceDetails(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPatchDeploymentTest() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeployments.CreatePatchDeploymentRequest request = + PatchDeployments.CreatePatchDeploymentRequest.newBuilder() + .setParent("parent-995424086") + .setPatchDeploymentId("patchDeploymentId-1180405976") + .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build()) + .build(); + + PatchDeployments.PatchDeployment actualResponse = client.createPatchDeployment(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.CreatePatchDeploymentRequest actualRequest = + ((PatchDeployments.CreatePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPatchDeploymentId(), actualRequest.getPatchDeploymentId()); + Assert.assertEquals(request.getPatchDeployment(), actualRequest.getPatchDeployment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeployments.CreatePatchDeploymentRequest request = + PatchDeployments.CreatePatchDeploymentRequest.newBuilder() + .setParent("parent-995424086") + .setPatchDeploymentId("patchDeploymentId-1180405976") + .setPatchDeployment(PatchDeployments.PatchDeployment.newBuilder().build()) + .build(); + client.createPatchDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPatchDeploymentTest() throws Exception { + PatchDeployments.PatchDeployment expectedResponse = + PatchDeployments.PatchDeployment.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setInstanceFilter(PatchJobs.PatchInstanceFilter.newBuilder().build()) + .setPatchConfig(PatchJobs.PatchConfig.newBuilder().build()) + .setDuration(Duration.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setLastExecuteTime(Timestamp.newBuilder().build()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeployments.GetPatchDeploymentRequest request = + PatchDeployments.GetPatchDeploymentRequest.newBuilder().setName("name3373707").build(); + + PatchDeployments.PatchDeployment actualResponse = client.getPatchDeployment(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.GetPatchDeploymentRequest actualRequest = + ((PatchDeployments.GetPatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeployments.GetPatchDeploymentRequest request = + PatchDeployments.GetPatchDeploymentRequest.newBuilder().setName("name3373707").build(); + client.getPatchDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPatchDeploymentsTest() throws Exception { + PatchDeployments.PatchDeployment responsesElement = + PatchDeployments.PatchDeployment.newBuilder().build(); + PatchDeployments.ListPatchDeploymentsResponse expectedResponse = + PatchDeployments.ListPatchDeploymentsResponse.newBuilder() + .setNextPageToken("") + .addAllPatchDeployments(Arrays.asList(responsesElement)) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeployments.ListPatchDeploymentsRequest request = + PatchDeployments.ListPatchDeploymentsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListPatchDeploymentsPagedResponse pagedListResponse = client.listPatchDeployments(request); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPatchDeploymentsList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.ListPatchDeploymentsRequest actualRequest = + ((PatchDeployments.ListPatchDeploymentsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPatchDeploymentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeployments.ListPatchDeploymentsRequest request = + PatchDeployments.ListPatchDeploymentsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listPatchDeployments(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePatchDeploymentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockOsConfigService.addResponse(expectedResponse); + + PatchDeployments.DeletePatchDeploymentRequest request = + PatchDeployments.DeletePatchDeploymentRequest.newBuilder().setName("name3373707").build(); + + client.deletePatchDeployment(request); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PatchDeployments.DeletePatchDeploymentRequest actualRequest = + ((PatchDeployments.DeletePatchDeploymentRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePatchDeploymentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + PatchDeployments.DeletePatchDeploymentRequest request = + PatchDeployments.DeletePatchDeploymentRequest.newBuilder().setName("name3373707").build(); + client.deletePatchDeployment(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGuestPolicyTest() throws Exception { + GuestPolicies.GuestPolicy expectedResponse = + GuestPolicies.GuestPolicy.newBuilder() + .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAssignment(GuestPolicies.Assignment.newBuilder().build()) + .addAllPackages(new ArrayList()) + .addAllPackageRepositories(new ArrayList()) + .addAllRecipes(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build(); + + GuestPolicies.GuestPolicy actualResponse = client.createGuestPolicy(parent, guestPolicy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.CreateGuestPolicyRequest actualRequest = + ((GuestPolicies.CreateGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(guestPolicy, actualRequest.getGuestPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGuestPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build(); + client.createGuestPolicy(parent, guestPolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createGuestPolicyTest2() throws Exception { + GuestPolicies.GuestPolicy expectedResponse = + GuestPolicies.GuestPolicy.newBuilder() + .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAssignment(GuestPolicies.Assignment.newBuilder().build()) + .addAllPackages(new ArrayList()) + .addAllPackageRepositories(new ArrayList()) + .addAllRecipes(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build(); + + GuestPolicies.GuestPolicy actualResponse = client.createGuestPolicy(parent, guestPolicy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.CreateGuestPolicyRequest actualRequest = + ((GuestPolicies.CreateGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(guestPolicy, actualRequest.getGuestPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGuestPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build(); + client.createGuestPolicy(parent, guestPolicy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGuestPolicyTest() throws Exception { + GuestPolicies.GuestPolicy expectedResponse = + GuestPolicies.GuestPolicy.newBuilder() + .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAssignment(GuestPolicies.Assignment.newBuilder().build()) + .addAllPackages(new ArrayList()) + .addAllPackageRepositories(new ArrayList()) + .addAllRecipes(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]"); + + GuestPolicies.GuestPolicy actualResponse = client.getGuestPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.GetGuestPolicyRequest actualRequest = + ((GuestPolicies.GetGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGuestPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]"); + client.getGuestPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGuestPolicyTest2() throws Exception { + GuestPolicies.GuestPolicy expectedResponse = + GuestPolicies.GuestPolicy.newBuilder() + .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAssignment(GuestPolicies.Assignment.newBuilder().build()) + .addAllPackages(new ArrayList()) + .addAllPackageRepositories(new ArrayList()) + .addAllRecipes(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + GuestPolicies.GuestPolicy actualResponse = client.getGuestPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.GetGuestPolicyRequest actualRequest = + ((GuestPolicies.GetGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGuestPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String name = "name3373707"; + client.getGuestPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGuestPoliciesTest() throws Exception { + GuestPolicies.GuestPolicy responsesElement = GuestPolicies.GuestPolicy.newBuilder().build(); + GuestPolicies.ListGuestPoliciesResponse expectedResponse = + GuestPolicies.ListGuestPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllGuestPolicies(Arrays.asList(responsesElement)) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListGuestPoliciesPagedResponse pagedListResponse = client.listGuestPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGuestPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.ListGuestPoliciesRequest actualRequest = + ((GuestPolicies.ListGuestPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGuestPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listGuestPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGuestPoliciesTest2() throws Exception { + GuestPolicies.GuestPolicy responsesElement = GuestPolicies.GuestPolicy.newBuilder().build(); + GuestPolicies.ListGuestPoliciesResponse expectedResponse = + GuestPolicies.ListGuestPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllGuestPolicies(Arrays.asList(responsesElement)) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGuestPoliciesPagedResponse pagedListResponse = client.listGuestPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGuestPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.ListGuestPoliciesRequest actualRequest = + ((GuestPolicies.ListGuestPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGuestPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listGuestPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGuestPolicyTest() throws Exception { + GuestPolicies.GuestPolicy expectedResponse = + GuestPolicies.GuestPolicy.newBuilder() + .setName(GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setAssignment(GuestPolicies.Assignment.newBuilder().build()) + .addAllPackages(new ArrayList()) + .addAllPackageRepositories(new ArrayList()) + .addAllRecipes(new ArrayList()) + .setEtag("etag3123477") + .build(); + mockOsConfigService.addResponse(expectedResponse); + + GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GuestPolicies.GuestPolicy actualResponse = client.updateGuestPolicy(guestPolicy, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.UpdateGuestPolicyRequest actualRequest = + ((GuestPolicies.UpdateGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(guestPolicy, actualRequest.getGuestPolicy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGuestPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + GuestPolicies.GuestPolicy guestPolicy = GuestPolicies.GuestPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGuestPolicy(guestPolicy, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGuestPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockOsConfigService.addResponse(expectedResponse); + + GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]"); + + client.deleteGuestPolicy(name); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.DeleteGuestPolicyRequest actualRequest = + ((GuestPolicies.DeleteGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGuestPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + GuestPolicyName name = GuestPolicyName.of("[PROJECT]", "[GUEST_POLICY]"); + client.deleteGuestPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGuestPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockOsConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteGuestPolicy(name); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.DeleteGuestPolicyRequest actualRequest = + ((GuestPolicies.DeleteGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGuestPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + String name = "name3373707"; + client.deleteGuestPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void lookupEffectiveGuestPolicyTest() throws Exception { + GuestPolicies.EffectiveGuestPolicy expectedResponse = + GuestPolicies.EffectiveGuestPolicy.newBuilder() + .addAllPackages(new ArrayList()) + .addAllPackageRepositories( + new ArrayList()) + .addAllSoftwareRecipes( + new ArrayList()) + .build(); + mockOsConfigService.addResponse(expectedResponse); + + GuestPolicies.LookupEffectiveGuestPolicyRequest request = + GuestPolicies.LookupEffectiveGuestPolicyRequest.newBuilder() + .setInstance("instance555127957") + .setOsShortName("osShortName1253394339") + .setOsVersion("osVersion1812004436") + .setOsArchitecture("osArchitecture1339954519") + .build(); + + GuestPolicies.EffectiveGuestPolicy actualResponse = client.lookupEffectiveGuestPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockOsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GuestPolicies.LookupEffectiveGuestPolicyRequest actualRequest = + ((GuestPolicies.LookupEffectiveGuestPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInstance(), actualRequest.getInstance()); + Assert.assertEquals(request.getOsShortName(), actualRequest.getOsShortName()); + Assert.assertEquals(request.getOsVersion(), actualRequest.getOsVersion()); + Assert.assertEquals(request.getOsArchitecture(), actualRequest.getOsArchitecture()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void lookupEffectiveGuestPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockOsConfigService.addException(exception); + + try { + GuestPolicies.LookupEffectiveGuestPolicyRequest request = + GuestPolicies.LookupEffectiveGuestPolicyRequest.newBuilder() + .setInstance("instance555127957") + .setOsShortName("osShortName1253394339") + .setOsVersion("osVersion1812004436") + .setOsArchitecture("osArchitecture1339954519") + .build(); + client.lookupEffectiveGuestPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java b/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java new file mode 100644 index 00000000..69ac039f --- /dev/null +++ b/grpc-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceGrpc.java @@ -0,0 +1,1878 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1alpha; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Zonal OS Config API
+ * The OS Config service is the server-side component that allows users to
+ * manage package installations and patch jobs for Compute Engine VM instances.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto") +public final class OsConfigZonalServiceGrpc { + + private OsConfigZonalServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.osconfig.v1alpha.OsConfigZonalService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getCreateOSPolicyAssignmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateOSPolicyAssignment", + requestType = com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getCreateOSPolicyAssignmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getCreateOSPolicyAssignmentMethod; + if ((getCreateOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getCreateOSPolicyAssignmentMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getCreateOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getCreateOSPolicyAssignmentMethod) + == null) { + OsConfigZonalServiceGrpc.getCreateOSPolicyAssignmentMethod = + getCreateOSPolicyAssignmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateOSPolicyAssignment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "CreateOSPolicyAssignment")) + .build(); + } + } + } + return getCreateOSPolicyAssignmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getUpdateOSPolicyAssignmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateOSPolicyAssignment", + requestType = com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getUpdateOSPolicyAssignmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getUpdateOSPolicyAssignmentMethod; + if ((getUpdateOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getUpdateOSPolicyAssignmentMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getUpdateOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getUpdateOSPolicyAssignmentMethod) + == null) { + OsConfigZonalServiceGrpc.getUpdateOSPolicyAssignmentMethod = + getUpdateOSPolicyAssignmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateOSPolicyAssignment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "UpdateOSPolicyAssignment")) + .build(); + } + } + } + return getUpdateOSPolicyAssignmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment> + getGetOSPolicyAssignmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOSPolicyAssignment", + requestType = com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment> + getGetOSPolicyAssignmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment> + getGetOSPolicyAssignmentMethod; + if ((getGetOSPolicyAssignmentMethod = OsConfigZonalServiceGrpc.getGetOSPolicyAssignmentMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getGetOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getGetOSPolicyAssignmentMethod) + == null) { + OsConfigZonalServiceGrpc.getGetOSPolicyAssignmentMethod = + getGetOSPolicyAssignmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetOSPolicyAssignment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier("GetOSPolicyAssignment")) + .build(); + } + } + } + return getGetOSPolicyAssignmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse> + getListOSPolicyAssignmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOSPolicyAssignments", + requestType = com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse> + getListOSPolicyAssignmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse> + getListOSPolicyAssignmentsMethod; + if ((getListOSPolicyAssignmentsMethod = + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentsMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getListOSPolicyAssignmentsMethod = + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentsMethod) + == null) { + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentsMethod = + getListOSPolicyAssignmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListOSPolicyAssignments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "ListOSPolicyAssignments")) + .build(); + } + } + } + return getListOSPolicyAssignmentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse> + getListOSPolicyAssignmentRevisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOSPolicyAssignmentRevisions", + requestType = com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.class, + responseType = + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse> + getListOSPolicyAssignmentRevisionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse> + getListOSPolicyAssignmentRevisionsMethod; + if ((getListOSPolicyAssignmentRevisionsMethod = + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentRevisionsMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getListOSPolicyAssignmentRevisionsMethod = + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentRevisionsMethod) + == null) { + OsConfigZonalServiceGrpc.getListOSPolicyAssignmentRevisionsMethod = + getListOSPolicyAssignmentRevisionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListOSPolicyAssignmentRevisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha + .ListOSPolicyAssignmentRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha + .ListOSPolicyAssignmentRevisionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "ListOSPolicyAssignmentRevisions")) + .build(); + } + } + } + return getListOSPolicyAssignmentRevisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getDeleteOSPolicyAssignmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteOSPolicyAssignment", + requestType = com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getDeleteOSPolicyAssignmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, + com.google.longrunning.Operation> + getDeleteOSPolicyAssignmentMethod; + if ((getDeleteOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getDeleteOSPolicyAssignmentMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getDeleteOSPolicyAssignmentMethod = + OsConfigZonalServiceGrpc.getDeleteOSPolicyAssignmentMethod) + == null) { + OsConfigZonalServiceGrpc.getDeleteOSPolicyAssignmentMethod = + getDeleteOSPolicyAssignmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteOSPolicyAssignment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "DeleteOSPolicyAssignment")) + .build(); + } + } + } + return getDeleteOSPolicyAssignmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance> + getGetInstanceOSPoliciesComplianceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstanceOSPoliciesCompliance", + requestType = com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance> + getGetInstanceOSPoliciesComplianceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance> + getGetInstanceOSPoliciesComplianceMethod; + if ((getGetInstanceOSPoliciesComplianceMethod = + OsConfigZonalServiceGrpc.getGetInstanceOSPoliciesComplianceMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getGetInstanceOSPoliciesComplianceMethod = + OsConfigZonalServiceGrpc.getGetInstanceOSPoliciesComplianceMethod) + == null) { + OsConfigZonalServiceGrpc.getGetInstanceOSPoliciesComplianceMethod = + getGetInstanceOSPoliciesComplianceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetInstanceOSPoliciesCompliance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha + .GetInstanceOSPoliciesComplianceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "GetInstanceOSPoliciesCompliance")) + .build(); + } + } + } + return getGetInstanceOSPoliciesComplianceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> + getListInstanceOSPoliciesCompliancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstanceOSPoliciesCompliances", + requestType = + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.class, + responseType = + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> + getListInstanceOSPoliciesCompliancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> + getListInstanceOSPoliciesCompliancesMethod; + if ((getListInstanceOSPoliciesCompliancesMethod = + OsConfigZonalServiceGrpc.getListInstanceOSPoliciesCompliancesMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getListInstanceOSPoliciesCompliancesMethod = + OsConfigZonalServiceGrpc.getListInstanceOSPoliciesCompliancesMethod) + == null) { + OsConfigZonalServiceGrpc.getListInstanceOSPoliciesCompliancesMethod = + getListInstanceOSPoliciesCompliancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListInstanceOSPoliciesCompliances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha + .ListInstanceOSPoliciesCompliancesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha + .ListInstanceOSPoliciesCompliancesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "ListInstanceOSPoliciesCompliances")) + .build(); + } + } + } + return getListInstanceOSPoliciesCompliancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetInventoryRequest, + com.google.cloud.osconfig.v1alpha.Inventory> + getGetInventoryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInventory", + requestType = com.google.cloud.osconfig.v1alpha.GetInventoryRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.Inventory.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetInventoryRequest, + com.google.cloud.osconfig.v1alpha.Inventory> + getGetInventoryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetInventoryRequest, + com.google.cloud.osconfig.v1alpha.Inventory> + getGetInventoryMethod; + if ((getGetInventoryMethod = OsConfigZonalServiceGrpc.getGetInventoryMethod) == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getGetInventoryMethod = OsConfigZonalServiceGrpc.getGetInventoryMethod) == null) { + OsConfigZonalServiceGrpc.getGetInventoryMethod = + getGetInventoryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInventory")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.GetInventoryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.Inventory.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier("GetInventory")) + .build(); + } + } + } + return getGetInventoryMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest, + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse> + getListInventoriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInventories", + requestType = com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest, + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse> + getListInventoriesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest, + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse> + getListInventoriesMethod; + if ((getListInventoriesMethod = OsConfigZonalServiceGrpc.getListInventoriesMethod) == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getListInventoriesMethod = OsConfigZonalServiceGrpc.getListInventoriesMethod) + == null) { + OsConfigZonalServiceGrpc.getListInventoriesMethod = + getListInventoriesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInventories")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier("ListInventories")) + .build(); + } + } + } + return getListInventoriesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport> + getGetVulnerabilityReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetVulnerabilityReport", + requestType = com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.VulnerabilityReport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport> + getGetVulnerabilityReportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport> + getGetVulnerabilityReportMethod; + if ((getGetVulnerabilityReportMethod = OsConfigZonalServiceGrpc.getGetVulnerabilityReportMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getGetVulnerabilityReportMethod = + OsConfigZonalServiceGrpc.getGetVulnerabilityReportMethod) + == null) { + OsConfigZonalServiceGrpc.getGetVulnerabilityReportMethod = + getGetVulnerabilityReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetVulnerabilityReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "GetVulnerabilityReport")) + .build(); + } + } + } + return getGetVulnerabilityReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse> + getListVulnerabilityReportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListVulnerabilityReports", + requestType = com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.class, + responseType = com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse> + getListVulnerabilityReportsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse> + getListVulnerabilityReportsMethod; + if ((getListVulnerabilityReportsMethod = + OsConfigZonalServiceGrpc.getListVulnerabilityReportsMethod) + == null) { + synchronized (OsConfigZonalServiceGrpc.class) { + if ((getListVulnerabilityReportsMethod = + OsConfigZonalServiceGrpc.getListVulnerabilityReportsMethod) + == null) { + OsConfigZonalServiceGrpc.getListVulnerabilityReportsMethod = + getListVulnerabilityReportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListVulnerabilityReports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigZonalServiceMethodDescriptorSupplier( + "ListVulnerabilityReports")) + .build(); + } + } + } + return getListVulnerabilityReportsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static OsConfigZonalServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public OsConfigZonalServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigZonalServiceStub(channel, callOptions); + } + }; + return OsConfigZonalServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static OsConfigZonalServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public OsConfigZonalServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigZonalServiceBlockingStub(channel, callOptions); + } + }; + return OsConfigZonalServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static OsConfigZonalServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public OsConfigZonalServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigZonalServiceFutureStub(channel, callOptions); + } + }; + return OsConfigZonalServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Zonal OS Config API
+   * The OS Config service is the server-side component that allows users to
+   * manage package installations and patch jobs for Compute Engine VM instances.
+   * 
+ */ + public abstract static class OsConfigZonalServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Create an OS policy assignment.
+     * This method also creates the first revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public void createOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateOSPolicyAssignmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Update an existing OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public void updateOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateOSPolicyAssignmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieve an existing OS policy assignment.
+     * This method always returns the latest revision. In order to retrieve a
+     * previous revision of the assignment, also provide the revision ID in the
+     * `name` parameter.
+     * 
+ */ + public void getOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetOSPolicyAssignmentMethod(), responseObserver); + } + + /** + * + * + *
+     * List the OS policy assignments under the parent resource.
+     * For each OS policy assignment, the latest revision is returned.
+     * 
+ */ + public void listOSPolicyAssignments( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListOSPolicyAssignmentsMethod(), responseObserver); + } + + /** + * + * + *
+     * List the OS policy assignment revisions for a given OS policy assignment.
+     * 
+ */ + public void listOSPolicyAssignmentRevisions( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListOSPolicyAssignmentRevisionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete the OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * If the LRO completes and is not cancelled, all revisions associated with
+     * the OS policy assignment are deleted.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public void deleteOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteOSPolicyAssignmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get OS policies compliance data for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public void getInstanceOSPoliciesCompliance( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceOSPoliciesComplianceMethod(), responseObserver); + } + + /** + * + * + *
+     * List OS policies compliance data for all Compute Engine VM instances in the
+     * specified zone.
+     * 
+ */ + public void listInstanceOSPoliciesCompliances( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstanceOSPoliciesCompliancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Get inventory data for the specified VM instance. If the VM has no
+     * associated inventory, the message `NOT_FOUND` is returned.
+     * 
+ */ + public void getInventory( + com.google.cloud.osconfig.v1alpha.GetInventoryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInventoryMethod(), responseObserver); + } + + /** + * + * + *
+     * List inventory data for all VM instances in the specified zone.
+     * 
+ */ + public void listInventories( + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInventoriesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the vulnerability report for the specified VM instance. Only VMs with
+     * inventory data have vulnerability reports associated with them.
+     * 
+ */ + public void getVulnerabilityReport( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetVulnerabilityReportMethod(), responseObserver); + } + + /** + * + * + *
+     * List vulnerability reports for all VM instances in the specified zone.
+     * 
+ */ + public void listVulnerabilityReports( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListVulnerabilityReportsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateOSPolicyAssignmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_OSPOLICY_ASSIGNMENT))) + .addMethod( + getUpdateOSPolicyAssignmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_OSPOLICY_ASSIGNMENT))) + .addMethod( + getGetOSPolicyAssignmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment>( + this, METHODID_GET_OSPOLICY_ASSIGNMENT))) + .addMethod( + getListOSPolicyAssignmentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse>( + this, METHODID_LIST_OSPOLICY_ASSIGNMENTS))) + .addMethod( + getListOSPolicyAssignmentRevisionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse>( + this, METHODID_LIST_OSPOLICY_ASSIGNMENT_REVISIONS))) + .addMethod( + getDeleteOSPolicyAssignmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_OSPOLICY_ASSIGNMENT))) + .addMethod( + getGetInstanceOSPoliciesComplianceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance>( + this, METHODID_GET_INSTANCE_OSPOLICIES_COMPLIANCE))) + .addMethod( + getListInstanceOSPoliciesCompliancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse>( + this, METHODID_LIST_INSTANCE_OSPOLICIES_COMPLIANCES))) + .addMethod( + getGetInventoryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.GetInventoryRequest, + com.google.cloud.osconfig.v1alpha.Inventory>(this, METHODID_GET_INVENTORY))) + .addMethod( + getListInventoriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest, + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse>( + this, METHODID_LIST_INVENTORIES))) + .addMethod( + getGetVulnerabilityReportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport>( + this, METHODID_GET_VULNERABILITY_REPORT))) + .addMethod( + getListVulnerabilityReportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse>( + this, METHODID_LIST_VULNERABILITY_REPORTS))) + .build(); + } + } + + /** + * + * + *
+   * Zonal OS Config API
+   * The OS Config service is the server-side component that allows users to
+   * manage package installations and patch jobs for Compute Engine VM instances.
+   * 
+ */ + public static final class OsConfigZonalServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private OsConfigZonalServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OsConfigZonalServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigZonalServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Create an OS policy assignment.
+     * This method also creates the first revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public void createOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateOSPolicyAssignmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update an existing OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public void updateOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateOSPolicyAssignmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieve an existing OS policy assignment.
+     * This method always returns the latest revision. In order to retrieve a
+     * previous revision of the assignment, also provide the revision ID in the
+     * `name` parameter.
+     * 
+ */ + public void getOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOSPolicyAssignmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List the OS policy assignments under the parent resource.
+     * For each OS policy assignment, the latest revision is returned.
+     * 
+ */ + public void listOSPolicyAssignments( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOSPolicyAssignmentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List the OS policy assignment revisions for a given OS policy assignment.
+     * 
+ */ + public void listOSPolicyAssignmentRevisions( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListOSPolicyAssignmentRevisionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete the OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * If the LRO completes and is not cancelled, all revisions associated with
+     * the OS policy assignment are deleted.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public void deleteOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteOSPolicyAssignmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get OS policies compliance data for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public void getInstanceOSPoliciesCompliance( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceOSPoliciesComplianceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List OS policies compliance data for all Compute Engine VM instances in the
+     * specified zone.
+     * 
+ */ + public void listInstanceOSPoliciesCompliances( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstanceOSPoliciesCompliancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get inventory data for the specified VM instance. If the VM has no
+     * associated inventory, the message `NOT_FOUND` is returned.
+     * 
+ */ + public void getInventory( + com.google.cloud.osconfig.v1alpha.GetInventoryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInventoryMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List inventory data for all VM instances in the specified zone.
+     * 
+ */ + public void listInventories( + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInventoriesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the vulnerability report for the specified VM instance. Only VMs with
+     * inventory data have vulnerability reports associated with them.
+     * 
+ */ + public void getVulnerabilityReport( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetVulnerabilityReportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List vulnerability reports for all VM instances in the specified zone.
+     * 
+ */ + public void listVulnerabilityReports( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListVulnerabilityReportsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Zonal OS Config API
+   * The OS Config service is the server-side component that allows users to
+   * manage package installations and patch jobs for Compute Engine VM instances.
+   * 
+ */ + public static final class OsConfigZonalServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private OsConfigZonalServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OsConfigZonalServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigZonalServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Create an OS policy assignment.
+     * This method also creates the first revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public com.google.longrunning.Operation createOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateOSPolicyAssignmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update an existing OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public com.google.longrunning.Operation updateOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateOSPolicyAssignmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieve an existing OS policy assignment.
+     * This method always returns the latest revision. In order to retrieve a
+     * previous revision of the assignment, also provide the revision ID in the
+     * `name` parameter.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOSPolicyAssignmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List the OS policy assignments under the parent resource.
+     * For each OS policy assignment, the latest revision is returned.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + listOSPolicyAssignments( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOSPolicyAssignmentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List the OS policy assignment revisions for a given OS policy assignment.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + listOSPolicyAssignmentRevisions( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListOSPolicyAssignmentRevisionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete the OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * If the LRO completes and is not cancelled, all revisions associated with
+     * the OS policy assignment are deleted.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public com.google.longrunning.Operation deleteOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteOSPolicyAssignmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get OS policies compliance data for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + getInstanceOSPoliciesCompliance( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceOSPoliciesComplianceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List OS policies compliance data for all Compute Engine VM instances in the
+     * specified zone.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + listInstanceOSPoliciesCompliances( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstanceOSPoliciesCompliancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get inventory data for the specified VM instance. If the VM has no
+     * associated inventory, the message `NOT_FOUND` is returned.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.Inventory getInventory( + com.google.cloud.osconfig.v1alpha.GetInventoryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInventoryMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List inventory data for all VM instances in the specified zone.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.ListInventoriesResponse listInventories( + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInventoriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the vulnerability report for the specified VM instance. Only VMs with
+     * inventory data have vulnerability reports associated with them.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport getVulnerabilityReport( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetVulnerabilityReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List vulnerability reports for all VM instances in the specified zone.
+     * 
+ */ + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + listVulnerabilityReports( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListVulnerabilityReportsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Zonal OS Config API
+   * The OS Config service is the server-side component that allows users to
+   * manage package installations and patch jobs for Compute Engine VM instances.
+   * 
+ */ + public static final class OsConfigZonalServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private OsConfigZonalServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected OsConfigZonalServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new OsConfigZonalServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Create an OS policy assignment.
+     * This method also creates the first revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateOSPolicyAssignmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update an existing OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateOSPolicyAssignmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieve an existing OS policy assignment.
+     * This method always returns the latest revision. In order to retrieve a
+     * previous revision of the assignment, also provide the revision ID in the
+     * `name` parameter.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment> + getOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOSPolicyAssignmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List the OS policy assignments under the parent resource.
+     * For each OS policy assignment, the latest revision is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse> + listOSPolicyAssignments( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOSPolicyAssignmentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List the OS policy assignment revisions for a given OS policy assignment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse> + listOSPolicyAssignmentRevisions( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListOSPolicyAssignmentRevisionsMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Delete the OS policy assignment.
+     * This method creates a new revision of the OS policy assignment.
+     * This method returns a long running operation (LRO) that contains the
+     * rollout details. The rollout can be cancelled by cancelling the LRO.
+     * If the LRO completes and is not cancelled, all revisions associated with
+     * the OS policy assignment are deleted.
+     * For more information, see [Method:
+     * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteOSPolicyAssignment( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteOSPolicyAssignmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get OS policies compliance data for the specified Compute Engine VM
+     * instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance> + getInstanceOSPoliciesCompliance( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceOSPoliciesComplianceMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * List OS policies compliance data for all Compute Engine VM instances in the
+     * specified zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse> + listInstanceOSPoliciesCompliances( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstanceOSPoliciesCompliancesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Get inventory data for the specified VM instance. If the VM has no
+     * associated inventory, the message `NOT_FOUND` is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.Inventory> + getInventory(com.google.cloud.osconfig.v1alpha.GetInventoryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInventoryMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List inventory data for all VM instances in the specified zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse> + listInventories(com.google.cloud.osconfig.v1alpha.ListInventoriesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInventoriesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the vulnerability report for the specified VM instance. Only VMs with
+     * inventory data have vulnerability reports associated with them.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport> + getVulnerabilityReport( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetVulnerabilityReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List vulnerability reports for all VM instances in the specified zone.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse> + listVulnerabilityReports( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListVulnerabilityReportsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_OSPOLICY_ASSIGNMENT = 0; + private static final int METHODID_UPDATE_OSPOLICY_ASSIGNMENT = 1; + private static final int METHODID_GET_OSPOLICY_ASSIGNMENT = 2; + private static final int METHODID_LIST_OSPOLICY_ASSIGNMENTS = 3; + private static final int METHODID_LIST_OSPOLICY_ASSIGNMENT_REVISIONS = 4; + private static final int METHODID_DELETE_OSPOLICY_ASSIGNMENT = 5; + private static final int METHODID_GET_INSTANCE_OSPOLICIES_COMPLIANCE = 6; + private static final int METHODID_LIST_INSTANCE_OSPOLICIES_COMPLIANCES = 7; + private static final int METHODID_GET_INVENTORY = 8; + private static final int METHODID_LIST_INVENTORIES = 9; + private static final int METHODID_GET_VULNERABILITY_REPORT = 10; + private static final int METHODID_LIST_VULNERABILITY_REPORTS = 11; + + 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 OsConfigZonalServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(OsConfigZonalServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_OSPOLICY_ASSIGNMENT: + serviceImpl.createOSPolicyAssignment( + (com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_OSPOLICY_ASSIGNMENT: + serviceImpl.updateOSPolicyAssignment( + (com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_OSPOLICY_ASSIGNMENT: + serviceImpl.getOSPolicyAssignment( + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_OSPOLICY_ASSIGNMENTS: + serviceImpl.listOSPolicyAssignments( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse>) + responseObserver); + break; + case METHODID_LIST_OSPOLICY_ASSIGNMENT_REVISIONS: + serviceImpl.listOSPolicyAssignmentRevisions( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse>) + responseObserver); + break; + case METHODID_DELETE_OSPOLICY_ASSIGNMENT: + serviceImpl.deleteOSPolicyAssignment( + (com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSTANCE_OSPOLICIES_COMPLIANCE: + serviceImpl.getInstanceOSPoliciesCompliance( + (com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance>) + responseObserver); + break; + case METHODID_LIST_INSTANCE_OSPOLICIES_COMPLIANCES: + serviceImpl.listInstanceOSPoliciesCompliances( + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse>) + responseObserver); + break; + case METHODID_GET_INVENTORY: + serviceImpl.getInventory( + (com.google.cloud.osconfig.v1alpha.GetInventoryRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_INVENTORIES: + serviceImpl.listInventories( + (com.google.cloud.osconfig.v1alpha.ListInventoriesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse>) + responseObserver); + break; + case METHODID_GET_VULNERABILITY_REPORT: + serviceImpl.getVulnerabilityReport( + (com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_VULNERABILITY_REPORTS: + serviceImpl.listVulnerabilityReports( + (com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse>) + 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 OsConfigZonalServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + OsConfigZonalServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.osconfig.v1alpha.OsConfigZonalServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("OsConfigZonalService"); + } + } + + private static final class OsConfigZonalServiceFileDescriptorSupplier + extends OsConfigZonalServiceBaseDescriptorSupplier { + OsConfigZonalServiceFileDescriptorSupplier() {} + } + + private static final class OsConfigZonalServiceMethodDescriptorSupplier + extends OsConfigZonalServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + OsConfigZonalServiceMethodDescriptorSupplier(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 (OsConfigZonalServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new OsConfigZonalServiceFileDescriptorSupplier()) + .addMethod(getCreateOSPolicyAssignmentMethod()) + .addMethod(getUpdateOSPolicyAssignmentMethod()) + .addMethod(getGetOSPolicyAssignmentMethod()) + .addMethod(getListOSPolicyAssignmentsMethod()) + .addMethod(getListOSPolicyAssignmentRevisionsMethod()) + .addMethod(getDeleteOSPolicyAssignmentMethod()) + .addMethod(getGetInstanceOSPoliciesComplianceMethod()) + .addMethod(getListInstanceOSPoliciesCompliancesMethod()) + .addMethod(getGetInventoryMethod()) + .addMethod(getListInventoriesMethod()) + .addMethod(getGetVulnerabilityReportMethod()) + .addMethod(getListVulnerabilityReportsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java b/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java new file mode 100644 index 00000000..8108a000 --- /dev/null +++ b/grpc-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceGrpc.java @@ -0,0 +1,2156 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * 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/v1beta/osconfig_service.proto") +public final class OsConfigServiceGrpc { + + private OsConfigServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.osconfig.v1beta.OsConfigService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob> + getExecutePatchJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecutePatchJob", + requestType = com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob> + getExecutePatchJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ExecutePatchJob")) + .build(); + } + } + } + return getExecutePatchJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob> + getGetPatchJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPatchJob", + requestType = com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob> + getGetPatchJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("GetPatchJob")) + .build(); + } + } + } + return getGetPatchJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob> + getCancelPatchJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelPatchJob", + requestType = com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob> + getCancelPatchJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("CancelPatchJob")) + .build(); + } + } + } + return getCancelPatchJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse> + getListPatchJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPatchJobs", + requestType = com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse> + getListPatchJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ListPatchJobs")) + .build(); + } + } + } + return getListPatchJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse> + getListPatchJobInstanceDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPatchJobInstanceDetails", + requestType = + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest.class, + responseType = + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse> + getListPatchJobInstanceDetailsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .ListPatchJobInstanceDetailsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchJobs + .ListPatchJobInstanceDetailsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier( + "ListPatchJobInstanceDetails")) + .build(); + } + } + } + return getListPatchJobInstanceDetailsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getCreatePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePatchDeployment", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getCreatePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .CreatePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("CreatePatchDeployment")) + .build(); + } + } + } + return getCreatePatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getGetPatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPatchDeployment", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest.class, + responseType = com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getGetPatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .GetPatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("GetPatchDeployment")) + .build(); + } + } + } + return getGetPatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse> + getListPatchDeploymentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPatchDeployments", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest.class, + responseType = + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse> + getListPatchDeploymentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .ListPatchDeploymentsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.PatchDeployments + .ListPatchDeploymentsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ListPatchDeployments")) + .build(); + } + } + } + return getListPatchDeploymentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest, + com.google.protobuf.Empty> + getDeletePatchDeploymentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePatchDeployment", + requestType = + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest, + com.google.protobuf.Empty> + getDeletePatchDeploymentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .DeletePatchDeploymentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("DeletePatchDeployment")) + .build(); + } + } + } + return getDeletePatchDeploymentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getCreateGuestPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateGuestPolicy", + requestType = com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest.class, + responseType = com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getCreateGuestPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getCreateGuestPolicyMethod; + if ((getCreateGuestPolicyMethod = OsConfigServiceGrpc.getCreateGuestPolicyMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getCreateGuestPolicyMethod = OsConfigServiceGrpc.getCreateGuestPolicyMethod) == null) { + OsConfigServiceGrpc.getCreateGuestPolicyMethod = + getCreateGuestPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateGuestPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies + .CreateGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("CreateGuestPolicy")) + .build(); + } + } + } + return getCreateGuestPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getGetGuestPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGuestPolicy", + requestType = com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest.class, + responseType = com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getGetGuestPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getGetGuestPolicyMethod; + if ((getGetGuestPolicyMethod = OsConfigServiceGrpc.getGetGuestPolicyMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getGetGuestPolicyMethod = OsConfigServiceGrpc.getGetGuestPolicyMethod) == null) { + OsConfigServiceGrpc.getGetGuestPolicyMethod = + getGetGuestPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGuestPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("GetGuestPolicy")) + .build(); + } + } + } + return getGetGuestPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse> + getListGuestPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGuestPolicies", + requestType = com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest.class, + responseType = com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse> + getListGuestPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse> + getListGuestPoliciesMethod; + if ((getListGuestPoliciesMethod = OsConfigServiceGrpc.getListGuestPoliciesMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getListGuestPoliciesMethod = OsConfigServiceGrpc.getListGuestPoliciesMethod) == null) { + OsConfigServiceGrpc.getListGuestPoliciesMethod = + getListGuestPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGuestPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies + .ListGuestPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies + .ListGuestPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("ListGuestPolicies")) + .build(); + } + } + } + return getListGuestPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getUpdateGuestPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGuestPolicy", + requestType = com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest.class, + responseType = com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getUpdateGuestPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getUpdateGuestPolicyMethod; + if ((getUpdateGuestPolicyMethod = OsConfigServiceGrpc.getUpdateGuestPolicyMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getUpdateGuestPolicyMethod = OsConfigServiceGrpc.getUpdateGuestPolicyMethod) == null) { + OsConfigServiceGrpc.getUpdateGuestPolicyMethod = + getUpdateGuestPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateGuestPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies + .UpdateGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("UpdateGuestPolicy")) + .build(); + } + } + } + return getUpdateGuestPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest, + com.google.protobuf.Empty> + getDeleteGuestPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteGuestPolicy", + requestType = com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest, + com.google.protobuf.Empty> + getDeleteGuestPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest, + com.google.protobuf.Empty> + getDeleteGuestPolicyMethod; + if ((getDeleteGuestPolicyMethod = OsConfigServiceGrpc.getDeleteGuestPolicyMethod) == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getDeleteGuestPolicyMethod = OsConfigServiceGrpc.getDeleteGuestPolicyMethod) == null) { + OsConfigServiceGrpc.getDeleteGuestPolicyMethod = + getDeleteGuestPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteGuestPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies + .DeleteGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("DeleteGuestPolicy")) + .build(); + } + } + } + return getDeleteGuestPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy> + getLookupEffectiveGuestPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupEffectiveGuestPolicy", + requestType = + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest.class, + responseType = com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy> + getLookupEffectiveGuestPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy> + getLookupEffectiveGuestPolicyMethod; + if ((getLookupEffectiveGuestPolicyMethod = + OsConfigServiceGrpc.getLookupEffectiveGuestPolicyMethod) + == null) { + synchronized (OsConfigServiceGrpc.class) { + if ((getLookupEffectiveGuestPolicyMethod = + OsConfigServiceGrpc.getLookupEffectiveGuestPolicyMethod) + == null) { + OsConfigServiceGrpc.getLookupEffectiveGuestPolicyMethod = + getLookupEffectiveGuestPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "LookupEffectiveGuestPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies + .LookupEffectiveGuestPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new OsConfigServiceMethodDescriptorSupplier("LookupEffectiveGuestPolicy")) + .build(); + } + } + } + return getLookupEffectiveGuestPolicyMethod; + } + + /** 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.v1beta.PatchJobs.ExecutePatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.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.v1beta.PatchJobs.GetPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.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.v1beta.PatchJobs.CancelPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelPatchJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public void listPatchJobs( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPatchJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a list of instance details for a given patch job.
+     * 
+ */ + public void listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPatchJobInstanceDetailsMethod(), responseObserver); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public void createPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public void getPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public void listPatchDeployments( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPatchDeploymentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public void deletePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePatchDeploymentMethod(), responseObserver); + } + + /** + * + * + *
+     * Create an OS Config guest policy.
+     * 
+ */ + public void createGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateGuestPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Get an OS Config guest policy.
+     * 
+ */ + public void getGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetGuestPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a page of OS Config guest policies.
+     * 
+ */ + public void listGuestPolicies( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListGuestPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Update an OS Config guest policy.
+     * 
+ */ + public void updateGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGuestPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete an OS Config guest policy.
+     * 
+ */ + public void deleteGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteGuestPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup the effective guest policy that applies to a VM instance. This
+     * lookup merges all policies that are assigned to the instance ancestry.
+     * 
+ */ + public void lookupEffectiveGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getLookupEffectiveGuestPolicyMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getExecutePatchJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>( + this, METHODID_EXECUTE_PATCH_JOB))) + .addMethod( + getGetPatchJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>( + this, METHODID_GET_PATCH_JOB))) + .addMethod( + getCancelPatchJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>( + this, METHODID_CANCEL_PATCH_JOB))) + .addMethod( + getListPatchJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse>( + this, METHODID_LIST_PATCH_JOBS))) + .addMethod( + getListPatchJobInstanceDetailsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest, + com.google.cloud.osconfig.v1beta.PatchJobs + .ListPatchJobInstanceDetailsResponse>( + this, METHODID_LIST_PATCH_JOB_INSTANCE_DETAILS))) + .addMethod( + getCreatePatchDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments + .CreatePatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>( + this, METHODID_CREATE_PATCH_DEPLOYMENT))) + .addMethod( + getGetPatchDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>( + this, METHODID_GET_PATCH_DEPLOYMENT))) + .addMethod( + getListPatchDeploymentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest, + com.google.cloud.osconfig.v1beta.PatchDeployments + .ListPatchDeploymentsResponse>(this, METHODID_LIST_PATCH_DEPLOYMENTS))) + .addMethod( + getDeletePatchDeploymentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.PatchDeployments + .DeletePatchDeploymentRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_PATCH_DEPLOYMENT))) + .addMethod( + getCreateGuestPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>( + this, METHODID_CREATE_GUEST_POLICY))) + .addMethod( + getGetGuestPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>( + this, METHODID_GET_GUEST_POLICY))) + .addMethod( + getListGuestPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse>( + this, METHODID_LIST_GUEST_POLICIES))) + .addMethod( + getUpdateGuestPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>( + this, METHODID_UPDATE_GUEST_POLICY))) + .addMethod( + getDeleteGuestPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_GUEST_POLICY))) + .addMethod( + getLookupEffectiveGuestPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.osconfig.v1beta.GuestPolicies + .LookupEffectiveGuestPolicyRequest, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy>( + this, METHODID_LOOKUP_EFFECTIVE_GUEST_POLICY))) + .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.v1beta.PatchJobs.ExecutePatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.GetPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.CancelPatchJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelPatchJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public void listPatchJobs( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPatchJobInstanceDetailsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public void createPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public void getPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public void listPatchDeployments( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPatchDeploymentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public void deletePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePatchDeploymentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create an OS Config guest policy.
+     * 
+ */ + public void createGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateGuestPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get an OS Config guest policy.
+     * 
+ */ + public void getGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGuestPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a page of OS Config guest policies.
+     * 
+ */ + public void listGuestPolicies( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGuestPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update an OS Config guest policy.
+     * 
+ */ + public void updateGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGuestPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete an OS Config guest policy.
+     * 
+ */ + public void deleteGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteGuestPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup the effective guest policy that applies to a VM instance. This
+     * lookup merges all policies that are assigned to the instance ancestry.
+     * 
+ */ + public void lookupEffectiveGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLookupEffectiveGuestPolicyMethod(), 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.v1beta.PatchJobs.PatchJob executePatchJob( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest request) { + return io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.PatchJob getPatchJob( + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest request) { + return io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.PatchJob cancelPatchJob( + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelPatchJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse listPatchJobs( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPatchJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a list of instance details for a given patch job.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPatchJobInstanceDetailsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment createPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a page of OS Config patch deployments.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + listPatchDeployments( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPatchDeploymentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public com.google.protobuf.Empty deletePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePatchDeploymentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create an OS Config guest policy.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy createGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateGuestPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get an OS Config guest policy.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGuestPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a page of OS Config guest policies.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + listGuestPolicies( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGuestPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update an OS Config guest policy.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy updateGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGuestPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete an OS Config guest policy.
+     * 
+ */ + public com.google.protobuf.Empty deleteGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteGuestPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup the effective guest policy that applies to a VM instance. This
+     * lookup merges all policies that are assigned to the instance ancestry.
+     * 
+ */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + lookupEffectiveGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLookupEffectiveGuestPolicyMethod(), 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.v1beta.PatchJobs.PatchJob> + executePatchJob(com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest request) { + return io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.PatchJob> + getPatchJob(com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest request) { + return io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.PatchJob> + cancelPatchJob(com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelPatchJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a list of patch jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse> + listPatchJobs(com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest request) { + return io.grpc.stub.ClientCalls.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse> + listPatchJobInstanceDetails( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPatchJobInstanceDetailsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + createPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePatchDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment> + getPatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest request) { + return io.grpc.stub.ClientCalls.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse> + listPatchDeployments( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPatchDeploymentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete an OS Config patch deployment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePatchDeploymentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create an OS Config guest policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + createGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateGuestPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get an OS Config guest policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + getGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGuestPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a page of OS Config guest policies.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse> + listGuestPolicies( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGuestPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update an OS Config guest policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy> + updateGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGuestPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete an OS Config guest policy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteGuestPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup the effective guest policy that applies to a VM instance. This
+     * lookup merges all policies that are assigned to the instance ancestry.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy> + lookupEffectiveGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLookupEffectiveGuestPolicyMethod(), 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 int METHODID_CREATE_GUEST_POLICY = 9; + private static final int METHODID_GET_GUEST_POLICY = 10; + private static final int METHODID_LIST_GUEST_POLICIES = 11; + private static final int METHODID_UPDATE_GUEST_POLICY = 12; + private static final int METHODID_DELETE_GUEST_POLICY = 13; + private static final int METHODID_LOOKUP_EFFECTIVE_GUEST_POLICY = 14; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final 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.v1beta.PatchJobs.ExecutePatchJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PATCH_JOB: + serviceImpl.getPatchJob( + (com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CANCEL_PATCH_JOB: + serviceImpl.cancelPatchJob( + (com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PATCH_JOBS: + serviceImpl.listPatchJobs( + (com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse>) + responseObserver); + break; + case METHODID_LIST_PATCH_JOB_INSTANCE_DETAILS: + serviceImpl.listPatchJobInstanceDetails( + (com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchJobs + .ListPatchJobInstanceDetailsResponse>) + responseObserver); + break; + case METHODID_CREATE_PATCH_DEPLOYMENT: + serviceImpl.createPatchDeployment( + (com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>) + responseObserver); + break; + case METHODID_GET_PATCH_DEPLOYMENT: + serviceImpl.getPatchDeployment( + (com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment>) + responseObserver); + break; + case METHODID_LIST_PATCH_DEPLOYMENTS: + serviceImpl.listPatchDeployments( + (com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.PatchDeployments + .ListPatchDeploymentsResponse>) + responseObserver); + break; + case METHODID_DELETE_PATCH_DEPLOYMENT: + serviceImpl.deletePatchDeployment( + (com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_GUEST_POLICY: + serviceImpl.createGuestPolicy( + (com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>) + responseObserver); + break; + case METHODID_GET_GUEST_POLICY: + serviceImpl.getGuestPolicy( + (com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>) + responseObserver); + break; + case METHODID_LIST_GUEST_POLICIES: + serviceImpl.listGuestPolicies( + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse>) + responseObserver); + break; + case METHODID_UPDATE_GUEST_POLICY: + serviceImpl.updateGuestPolicy( + (com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>) + responseObserver); + break; + case METHODID_DELETE_GUEST_POLICY: + serviceImpl.deleteGuestPolicy( + (com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOOKUP_EFFECTIVE_GUEST_POLICY: + serviceImpl.lookupEffectiveGuestPolicy( + (com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy>) + 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.v1beta.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()) + .addMethod(getCreateGuestPolicyMethod()) + .addMethod(getGetGuestPolicyMethod()) + .addMethod(getListGuestPoliciesMethod()) + .addMethod(getUpdateGuestPolicyMethod()) + .addMethod(getDeleteGuestPolicyMethod()) + .addMethod(getLookupEffectiveGuestPolicyMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml b/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml new file mode 100644 index 00000000..8941944c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/osconfig/v1alpha/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/osconfig/v1alpha/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/osconfig/v1alpha/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3.java new file mode 100644 index 00000000..80520440 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3.java @@ -0,0 +1,3146 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * Common Vulnerability Scoring System version 3.
+ * For details, see https://www.first.org/cvss/specification-document
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.CVSSv3} + */ +public final class CVSSv3 extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.CVSSv3) + CVSSv3OrBuilder { + private static final long serialVersionUID = 0L; + // Use CVSSv3.newBuilder() to construct. + private CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CVSSv3() { + attackVector_ = 0; + attackComplexity_ = 0; + privilegesRequired_ = 0; + userInteraction_ = 0; + scope_ = 0; + confidentialityImpact_ = 0; + integrityImpact_ = 0; + availabilityImpact_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CVSSv3(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CVSSv3( + 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 13: + { + baseScore_ = input.readFloat(); + break; + } + case 21: + { + exploitabilityScore_ = input.readFloat(); + break; + } + case 29: + { + impactScore_ = input.readFloat(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + attackVector_ = rawValue; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + attackComplexity_ = rawValue; + break; + } + case 56: + { + int rawValue = input.readEnum(); + + privilegesRequired_ = rawValue; + break; + } + case 64: + { + int rawValue = input.readEnum(); + + userInteraction_ = rawValue; + break; + } + case 72: + { + int rawValue = input.readEnum(); + + scope_ = rawValue; + break; + } + case 80: + { + int rawValue = input.readEnum(); + + confidentialityImpact_ = rawValue; + break; + } + case 88: + { + int rawValue = input.readEnum(); + + integrityImpact_ = rawValue; + break; + } + case 96: + { + int rawValue = input.readEnum(); + + availabilityImpact_ = 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.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_CVSSv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_CVSSv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.CVSSv3.class, + com.google.cloud.osconfig.v1alpha.CVSSv3.Builder.class); + } + + /** + * + * + *
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.CVSSv3.AttackVector} + */ + public enum AttackVector implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + ATTACK_VECTOR_UNSPECIFIED(0), + /** + * + * + *
+     * The vulnerable component is bound to the network stack and the set of
+     * possible attackers extends beyond the other options listed below, up to
+     * and including the entire Internet.
+     * 
+ * + * ATTACK_VECTOR_NETWORK = 1; + */ + ATTACK_VECTOR_NETWORK(1), + /** + * + * + *
+     * The vulnerable component is bound to the network stack, but the attack is
+     * limited at the protocol level to a logically adjacent topology.
+     * 
+ * + * ATTACK_VECTOR_ADJACENT = 2; + */ + ATTACK_VECTOR_ADJACENT(2), + /** + * + * + *
+     * The vulnerable component is not bound to the network stack and the
+     * attacker's path is via read/write/execute capabilities.
+     * 
+ * + * ATTACK_VECTOR_LOCAL = 3; + */ + ATTACK_VECTOR_LOCAL(3), + /** + * + * + *
+     * The attack requires the attacker to physically touch or manipulate the
+     * vulnerable component.
+     * 
+ * + * ATTACK_VECTOR_PHYSICAL = 4; + */ + ATTACK_VECTOR_PHYSICAL(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_VECTOR_UNSPECIFIED = 0; + */ + public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The vulnerable component is bound to the network stack and the set of
+     * possible attackers extends beyond the other options listed below, up to
+     * and including the entire Internet.
+     * 
+ * + * ATTACK_VECTOR_NETWORK = 1; + */ + public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; + /** + * + * + *
+     * The vulnerable component is bound to the network stack, but the attack is
+     * limited at the protocol level to a logically adjacent topology.
+     * 
+ * + * ATTACK_VECTOR_ADJACENT = 2; + */ + public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; + /** + * + * + *
+     * The vulnerable component is not bound to the network stack and the
+     * attacker's path is via read/write/execute capabilities.
+     * 
+ * + * ATTACK_VECTOR_LOCAL = 3; + */ + public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; + /** + * + * + *
+     * The attack requires the attacker to physically touch or manipulate the
+     * vulnerable component.
+     * 
+ * + * ATTACK_VECTOR_PHYSICAL = 4; + */ + public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AttackVector 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 AttackVector forNumber(int value) { + switch (value) { + case 0: + return ATTACK_VECTOR_UNSPECIFIED; + case 1: + return ATTACK_VECTOR_NETWORK; + case 2: + return ATTACK_VECTOR_ADJACENT; + case 3: + return ATTACK_VECTOR_LOCAL; + case 4: + return ATTACK_VECTOR_PHYSICAL; + 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 AttackVector findValueByNumber(int number) { + return AttackVector.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDescriptor().getEnumTypes().get(0); + } + + private static final AttackVector[] VALUES = values(); + + public static AttackVector 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 AttackVector(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.CVSSv3.AttackVector) + } + + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity} + */ + public enum AttackComplexity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + ATTACK_COMPLEXITY_UNSPECIFIED(0), + /** + * + * + *
+     * Specialized access conditions or extenuating circumstances do not exist.
+     * An attacker can expect repeatable success when attacking the vulnerable
+     * component.
+     * 
+ * + * ATTACK_COMPLEXITY_LOW = 1; + */ + ATTACK_COMPLEXITY_LOW(1), + /** + * + * + *
+     * A successful attack depends on conditions beyond the attacker's control.
+     * That is, a successful attack cannot be accomplished at will, but requires
+     * the attacker to invest in some measurable amount of effort in preparation
+     * or execution against the vulnerable component before a successful attack
+     * can be expected.
+     * 
+ * + * ATTACK_COMPLEXITY_HIGH = 2; + */ + ATTACK_COMPLEXITY_HIGH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Specialized access conditions or extenuating circumstances do not exist.
+     * An attacker can expect repeatable success when attacking the vulnerable
+     * component.
+     * 
+ * + * ATTACK_COMPLEXITY_LOW = 1; + */ + public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; + /** + * + * + *
+     * A successful attack depends on conditions beyond the attacker's control.
+     * That is, a successful attack cannot be accomplished at will, but requires
+     * the attacker to invest in some measurable amount of effort in preparation
+     * or execution against the vulnerable component before a successful attack
+     * can be expected.
+     * 
+ * + * ATTACK_COMPLEXITY_HIGH = 2; + */ + public static final int ATTACK_COMPLEXITY_HIGH_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 AttackComplexity 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 AttackComplexity forNumber(int value) { + switch (value) { + case 0: + return ATTACK_COMPLEXITY_UNSPECIFIED; + case 1: + return ATTACK_COMPLEXITY_LOW; + case 2: + return ATTACK_COMPLEXITY_HIGH; + 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 AttackComplexity findValueByNumber(int number) { + return AttackComplexity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDescriptor().getEnumTypes().get(1); + } + + private static final AttackComplexity[] VALUES = values(); + + public static AttackComplexity 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 AttackComplexity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity) + } + + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired} + */ + public enum PrivilegesRequired implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + PRIVILEGES_REQUIRED_UNSPECIFIED(0), + /** + * + * + *
+     * The attacker is unauthorized prior to attack, and therefore does not
+     * require any access to settings or files of the vulnerable system to
+     * carry out an attack.
+     * 
+ * + * PRIVILEGES_REQUIRED_NONE = 1; + */ + PRIVILEGES_REQUIRED_NONE(1), + /** + * + * + *
+     * The attacker requires privileges that provide basic user capabilities
+     * that could normally affect only settings and files owned by a user.
+     * Alternatively, an attacker with Low privileges has the ability to access
+     * only non-sensitive resources.
+     * 
+ * + * PRIVILEGES_REQUIRED_LOW = 2; + */ + PRIVILEGES_REQUIRED_LOW(2), + /** + * + * + *
+     * The attacker requires privileges that provide significant (e.g.,
+     * administrative) control over the vulnerable component allowing access to
+     * component-wide settings and files.
+     * 
+ * + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + PRIVILEGES_REQUIRED_HIGH(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The attacker is unauthorized prior to attack, and therefore does not
+     * require any access to settings or files of the vulnerable system to
+     * carry out an attack.
+     * 
+ * + * PRIVILEGES_REQUIRED_NONE = 1; + */ + public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; + /** + * + * + *
+     * The attacker requires privileges that provide basic user capabilities
+     * that could normally affect only settings and files owned by a user.
+     * Alternatively, an attacker with Low privileges has the ability to access
+     * only non-sensitive resources.
+     * 
+ * + * PRIVILEGES_REQUIRED_LOW = 2; + */ + public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; + /** + * + * + *
+     * The attacker requires privileges that provide significant (e.g.,
+     * administrative) control over the vulnerable component allowing access to
+     * component-wide settings and files.
+     * 
+ * + * PRIVILEGES_REQUIRED_HIGH = 3; + */ + public static final int PRIVILEGES_REQUIRED_HIGH_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 PrivilegesRequired 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 PrivilegesRequired forNumber(int value) { + switch (value) { + case 0: + return PRIVILEGES_REQUIRED_UNSPECIFIED; + case 1: + return PRIVILEGES_REQUIRED_NONE; + case 2: + return PRIVILEGES_REQUIRED_LOW; + case 3: + return PRIVILEGES_REQUIRED_HIGH; + 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 PrivilegesRequired findValueByNumber(int number) { + return PrivilegesRequired.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDescriptor().getEnumTypes().get(2); + } + + private static final PrivilegesRequired[] VALUES = values(); + + public static PrivilegesRequired 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 PrivilegesRequired(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired) + } + + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction} + */ + public enum UserInteraction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * USER_INTERACTION_UNSPECIFIED = 0; + */ + USER_INTERACTION_UNSPECIFIED(0), + /** + * + * + *
+     * The vulnerable system can be exploited without interaction from any user.
+     * 
+ * + * USER_INTERACTION_NONE = 1; + */ + USER_INTERACTION_NONE(1), + /** + * + * + *
+     * Successful exploitation of this vulnerability requires a user to take
+     * some action before the vulnerability can be exploited.
+     * 
+ * + * USER_INTERACTION_REQUIRED = 2; + */ + USER_INTERACTION_REQUIRED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * USER_INTERACTION_UNSPECIFIED = 0; + */ + public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The vulnerable system can be exploited without interaction from any user.
+     * 
+ * + * USER_INTERACTION_NONE = 1; + */ + public static final int USER_INTERACTION_NONE_VALUE = 1; + /** + * + * + *
+     * Successful exploitation of this vulnerability requires a user to take
+     * some action before the vulnerability can be exploited.
+     * 
+ * + * USER_INTERACTION_REQUIRED = 2; + */ + public static final int USER_INTERACTION_REQUIRED_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 UserInteraction 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 UserInteraction forNumber(int value) { + switch (value) { + case 0: + return USER_INTERACTION_UNSPECIFIED; + case 1: + return USER_INTERACTION_NONE; + case 2: + return USER_INTERACTION_REQUIRED; + 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 UserInteraction findValueByNumber(int number) { + return UserInteraction.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDescriptor().getEnumTypes().get(3); + } + + private static final UserInteraction[] VALUES = values(); + + public static UserInteraction 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 UserInteraction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction) + } + + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.CVSSv3.Scope} + */ + public enum Scope implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * SCOPE_UNSPECIFIED = 0; + */ + SCOPE_UNSPECIFIED(0), + /** + * + * + *
+     * An exploited vulnerability can only affect resources managed by the same
+     * security authority.
+     * 
+ * + * SCOPE_UNCHANGED = 1; + */ + SCOPE_UNCHANGED(1), + /** + * + * + *
+     * An exploited vulnerability can affect resources beyond the security scope
+     * managed by the security authority of the vulnerable component.
+     * 
+ * + * SCOPE_CHANGED = 2; + */ + SCOPE_CHANGED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * SCOPE_UNSPECIFIED = 0; + */ + public static final int SCOPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * An exploited vulnerability can only affect resources managed by the same
+     * security authority.
+     * 
+ * + * SCOPE_UNCHANGED = 1; + */ + public static final int SCOPE_UNCHANGED_VALUE = 1; + /** + * + * + *
+     * An exploited vulnerability can affect resources beyond the security scope
+     * managed by the security authority of the vulnerable component.
+     * 
+ * + * SCOPE_CHANGED = 2; + */ + public static final int SCOPE_CHANGED_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 Scope 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 Scope forNumber(int value) { + switch (value) { + case 0: + return SCOPE_UNSPECIFIED; + case 1: + return SCOPE_UNCHANGED; + case 2: + return SCOPE_CHANGED; + 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 Scope findValueByNumber(int number) { + return Scope.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDescriptor().getEnumTypes().get(4); + } + + private static final Scope[] VALUES = values(); + + public static Scope 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 Scope(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.CVSSv3.Scope) + } + + /** + * + * + *
+   * The Impact metrics capture the effects of a successfully exploited
+   * vulnerability on the component that suffers the worst outcome that is most
+   * directly and predictably associated with the attack.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.CVSSv3.Impact} + */ + public enum Impact implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * IMPACT_UNSPECIFIED = 0; + */ + IMPACT_UNSPECIFIED(0), + /** + * + * + *
+     * High impact.
+     * 
+ * + * IMPACT_HIGH = 1; + */ + IMPACT_HIGH(1), + /** + * + * + *
+     * Low impact.
+     * 
+ * + * IMPACT_LOW = 2; + */ + IMPACT_LOW(2), + /** + * + * + *
+     * No impact.
+     * 
+ * + * IMPACT_NONE = 3; + */ + IMPACT_NONE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value.
+     * 
+ * + * IMPACT_UNSPECIFIED = 0; + */ + public static final int IMPACT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * High impact.
+     * 
+ * + * IMPACT_HIGH = 1; + */ + public static final int IMPACT_HIGH_VALUE = 1; + /** + * + * + *
+     * Low impact.
+     * 
+ * + * IMPACT_LOW = 2; + */ + public static final int IMPACT_LOW_VALUE = 2; + /** + * + * + *
+     * No impact.
+     * 
+ * + * IMPACT_NONE = 3; + */ + public static final int IMPACT_NONE_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 Impact 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 Impact forNumber(int value) { + switch (value) { + case 0: + return IMPACT_UNSPECIFIED; + case 1: + return IMPACT_HIGH; + case 2: + return IMPACT_LOW; + case 3: + return IMPACT_NONE; + 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 Impact findValueByNumber(int number) { + return Impact.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDescriptor().getEnumTypes().get(5); + } + + private static final Impact[] VALUES = values(); + + public static Impact 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 Impact(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.CVSSv3.Impact) + } + + public static final int BASE_SCORE_FIELD_NUMBER = 1; + private float baseScore_; + /** + * + * + *
+   * The base score is a function of the base metric scores.
+   * https://www.first.org/cvss/specification-document#Base-Metrics
+   * 
+ * + * float base_score = 1; + * + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + + public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; + private float exploitabilityScore_; + /** + * + * + *
+   * The Exploitability sub-score equation is derived from the Base
+   * Exploitability metrics.
+   * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
+   * 
+ * + * float exploitability_score = 2; + * + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + + public static final int IMPACT_SCORE_FIELD_NUMBER = 3; + private float impactScore_; + /** + * + * + *
+   * The Impact sub-score equation is derived from the Base Impact metrics.
+   * 
+ * + * float impact_score = 3; + * + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + + public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; + private int attackVector_; + /** + * + * + *
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override + public int getAttackVectorValue() { + return attackVector_; + } + /** + * + * + *
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return The attackVector. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector getAttackVector() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector result = + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector.valueOf(attackVector_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector.UNRECOGNIZED + : result; + } + + public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; + private int attackComplexity_; + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override + public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return The attackComplexity. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity getAttackComplexity() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity result = + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity.valueOf(attackComplexity_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity.UNRECOGNIZED + : result; + } + + public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; + private int privilegesRequired_; + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override + public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * @return The privilegesRequired. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired getPrivilegesRequired() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired result = + com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired.valueOf(privilegesRequired_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired.UNRECOGNIZED + : result; + } + + public static final int USER_INTERACTION_FIELD_NUMBER = 8; + private int userInteraction_; + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override + public int getUserInteractionValue() { + return userInteraction_; + } + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return The userInteraction. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction getUserInteraction() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction result = + com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction.valueOf(userInteraction_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction.UNRECOGNIZED + : result; + } + + public static final int SCOPE_FIELD_NUMBER = 9; + private int scope_; + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Scope getScope() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Scope result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Scope.valueOf(scope_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Scope.UNRECOGNIZED : result; + } + + public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; + private int confidentialityImpact_; + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override + public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return The confidentialityImpact. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getConfidentialityImpact() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.valueOf(confidentialityImpact_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.UNRECOGNIZED : result; + } + + public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; + private int integrityImpact_; + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override + public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return The integrityImpact. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getIntegrityImpact() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.valueOf(integrityImpact_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.UNRECOGNIZED : result; + } + + public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; + private int availabilityImpact_; + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override + public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return The availabilityImpact. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getAvailabilityImpact() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.valueOf(availabilityImpact_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.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 (baseScore_ != 0F) { + output.writeFloat(1, baseScore_); + } + if (exploitabilityScore_ != 0F) { + output.writeFloat(2, exploitabilityScore_); + } + if (impactScore_ != 0F) { + output.writeFloat(3, impactScore_); + } + if (attackVector_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, attackVector_); + } + if (attackComplexity_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, attackComplexity_); + } + if (privilegesRequired_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired + .PRIVILEGES_REQUIRED_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, privilegesRequired_); + } + if (userInteraction_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, userInteraction_); + } + if (scope_ != com.google.cloud.osconfig.v1alpha.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, scope_); + } + if (confidentialityImpact_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(10, confidentialityImpact_); + } + if (integrityImpact_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(11, integrityImpact_); + } + if (availabilityImpact_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + output.writeEnum(12, availabilityImpact_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (baseScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, baseScore_); + } + if (exploitabilityScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, exploitabilityScore_); + } + if (impactScore_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, impactScore_); + } + if (attackVector_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, attackVector_); + } + if (attackComplexity_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, attackComplexity_); + } + if (privilegesRequired_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired + .PRIVILEGES_REQUIRED_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, privilegesRequired_); + } + if (userInteraction_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, userInteraction_); + } + if (scope_ != com.google.cloud.osconfig.v1alpha.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, scope_); + } + if (confidentialityImpact_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, confidentialityImpact_); + } + if (integrityImpact_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, integrityImpact_); + } + if (availabilityImpact_ + != com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, availabilityImpact_); + } + 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.v1alpha.CVSSv3)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.CVSSv3 other = (com.google.cloud.osconfig.v1alpha.CVSSv3) obj; + + if (java.lang.Float.floatToIntBits(getBaseScore()) + != java.lang.Float.floatToIntBits(other.getBaseScore())) return false; + if (java.lang.Float.floatToIntBits(getExploitabilityScore()) + != java.lang.Float.floatToIntBits(other.getExploitabilityScore())) return false; + if (java.lang.Float.floatToIntBits(getImpactScore()) + != java.lang.Float.floatToIntBits(other.getImpactScore())) return false; + if (attackVector_ != other.attackVector_) return false; + if (attackComplexity_ != other.attackComplexity_) return false; + if (privilegesRequired_ != other.privilegesRequired_) return false; + if (userInteraction_ != other.userInteraction_) return false; + if (scope_ != other.scope_) return false; + if (confidentialityImpact_ != other.confidentialityImpact_) return false; + if (integrityImpact_ != other.integrityImpact_) return false; + if (availabilityImpact_ != other.availabilityImpact_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBaseScore()); + hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getExploitabilityScore()); + hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getImpactScore()); + hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + attackVector_; + hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; + hash = (53 * hash) + attackComplexity_; + hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + privilegesRequired_; + hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; + hash = (53 * hash) + userInteraction_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + confidentialityImpact_; + hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + integrityImpact_; + hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; + hash = (53 * hash) + availabilityImpact_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 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.v1alpha.CVSSv3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 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.v1alpha.CVSSv3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 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.v1alpha.CVSSv3 parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 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.v1alpha.CVSSv3 parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 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.v1alpha.CVSSv3 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 Vulnerability Scoring System version 3.
+   * For details, see https://www.first.org/cvss/specification-document
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.CVSSv3} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.CVSSv3) + com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_CVSSv3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_CVSSv3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.CVSSv3.class, + com.google.cloud.osconfig.v1alpha.CVSSv3.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.CVSSv3.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(); + baseScore_ = 0F; + + exploitabilityScore_ = 0F; + + impactScore_ = 0F; + + attackVector_ = 0; + + attackComplexity_ = 0; + + privilegesRequired_ = 0; + + userInteraction_ = 0; + + scope_ = 0; + + confidentialityImpact_ = 0; + + integrityImpact_ = 0; + + availabilityImpact_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_CVSSv3_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3 getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.CVSSv3.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3 build() { + com.google.cloud.osconfig.v1alpha.CVSSv3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3 buildPartial() { + com.google.cloud.osconfig.v1alpha.CVSSv3 result = + new com.google.cloud.osconfig.v1alpha.CVSSv3(this); + result.baseScore_ = baseScore_; + result.exploitabilityScore_ = exploitabilityScore_; + result.impactScore_ = impactScore_; + result.attackVector_ = attackVector_; + result.attackComplexity_ = attackComplexity_; + result.privilegesRequired_ = privilegesRequired_; + result.userInteraction_ = userInteraction_; + result.scope_ = scope_; + result.confidentialityImpact_ = confidentialityImpact_; + result.integrityImpact_ = integrityImpact_; + result.availabilityImpact_ = availabilityImpact_; + 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.v1alpha.CVSSv3) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.CVSSv3) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.CVSSv3 other) { + if (other == com.google.cloud.osconfig.v1alpha.CVSSv3.getDefaultInstance()) return this; + if (other.getBaseScore() != 0F) { + setBaseScore(other.getBaseScore()); + } + if (other.getExploitabilityScore() != 0F) { + setExploitabilityScore(other.getExploitabilityScore()); + } + if (other.getImpactScore() != 0F) { + setImpactScore(other.getImpactScore()); + } + if (other.attackVector_ != 0) { + setAttackVectorValue(other.getAttackVectorValue()); + } + if (other.attackComplexity_ != 0) { + setAttackComplexityValue(other.getAttackComplexityValue()); + } + if (other.privilegesRequired_ != 0) { + setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); + } + if (other.userInteraction_ != 0) { + setUserInteractionValue(other.getUserInteractionValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.confidentialityImpact_ != 0) { + setConfidentialityImpactValue(other.getConfidentialityImpactValue()); + } + if (other.integrityImpact_ != 0) { + setIntegrityImpactValue(other.getIntegrityImpactValue()); + } + if (other.availabilityImpact_ != 0) { + setAvailabilityImpactValue(other.getAvailabilityImpactValue()); + } + 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.v1alpha.CVSSv3 parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.osconfig.v1alpha.CVSSv3) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float baseScore_; + /** + * + * + *
+     * The base score is a function of the base metric scores.
+     * https://www.first.org/cvss/specification-document#Base-Metrics
+     * 
+ * + * float base_score = 1; + * + * @return The baseScore. + */ + @java.lang.Override + public float getBaseScore() { + return baseScore_; + } + /** + * + * + *
+     * The base score is a function of the base metric scores.
+     * https://www.first.org/cvss/specification-document#Base-Metrics
+     * 
+ * + * float base_score = 1; + * + * @param value The baseScore to set. + * @return This builder for chaining. + */ + public Builder setBaseScore(float value) { + + baseScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The base score is a function of the base metric scores.
+     * https://www.first.org/cvss/specification-document#Base-Metrics
+     * 
+ * + * float base_score = 1; + * + * @return This builder for chaining. + */ + public Builder clearBaseScore() { + + baseScore_ = 0F; + onChanged(); + return this; + } + + private float exploitabilityScore_; + /** + * + * + *
+     * The Exploitability sub-score equation is derived from the Base
+     * Exploitability metrics.
+     * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
+     * 
+ * + * float exploitability_score = 2; + * + * @return The exploitabilityScore. + */ + @java.lang.Override + public float getExploitabilityScore() { + return exploitabilityScore_; + } + /** + * + * + *
+     * The Exploitability sub-score equation is derived from the Base
+     * Exploitability metrics.
+     * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
+     * 
+ * + * float exploitability_score = 2; + * + * @param value The exploitabilityScore to set. + * @return This builder for chaining. + */ + public Builder setExploitabilityScore(float value) { + + exploitabilityScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Exploitability sub-score equation is derived from the Base
+     * Exploitability metrics.
+     * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
+     * 
+ * + * float exploitability_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearExploitabilityScore() { + + exploitabilityScore_ = 0F; + onChanged(); + return this; + } + + private float impactScore_; + /** + * + * + *
+     * The Impact sub-score equation is derived from the Base Impact metrics.
+     * 
+ * + * float impact_score = 3; + * + * @return The impactScore. + */ + @java.lang.Override + public float getImpactScore() { + return impactScore_; + } + /** + * + * + *
+     * The Impact sub-score equation is derived from the Base Impact metrics.
+     * 
+ * + * float impact_score = 3; + * + * @param value The impactScore to set. + * @return This builder for chaining. + */ + public Builder setImpactScore(float value) { + + impactScore_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Impact sub-score equation is derived from the Base Impact metrics.
+     * 
+ * + * float impact_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearImpactScore() { + + impactScore_ = 0F; + onChanged(); + return this; + } + + private int attackVector_ = 0; + /** + * + * + *
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return The enum numeric value on the wire for attackVector. + */ + @java.lang.Override + public int getAttackVectorValue() { + return attackVector_; + } + /** + * + * + *
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @param value The enum numeric value on the wire for attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVectorValue(int value) { + + attackVector_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return The attackVector. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector getAttackVector() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector result = + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector.valueOf(attackVector_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @param value The attackVector to set. + * @return This builder for chaining. + */ + public Builder setAttackVector(com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector value) { + if (value == null) { + throw new NullPointerException(); + } + + attackVector_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric reflects the context by which vulnerability exploitation is
+     * possible.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return This builder for chaining. + */ + public Builder clearAttackVector() { + + attackVector_ = 0; + onChanged(); + return this; + } + + private int attackComplexity_ = 0; + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return The enum numeric value on the wire for attackComplexity. + */ + @java.lang.Override + public int getAttackComplexityValue() { + return attackComplexity_; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @param value The enum numeric value on the wire for attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexityValue(int value) { + + attackComplexity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return The attackComplexity. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity getAttackComplexity() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity result = + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity.valueOf(attackComplexity_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @param value The attackComplexity to set. + * @return This builder for chaining. + */ + public Builder setAttackComplexity( + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity value) { + if (value == null) { + throw new NullPointerException(); + } + + attackComplexity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the conditions beyond the attacker's control that
+     * must exist in order to exploit the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return This builder for chaining. + */ + public Builder clearAttackComplexity() { + + attackComplexity_ = 0; + onChanged(); + return this; + } + + private int privilegesRequired_ = 0; + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * + * @return The enum numeric value on the wire for privilegesRequired. + */ + @java.lang.Override + public int getPrivilegesRequiredValue() { + return privilegesRequired_; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * + * @param value The enum numeric value on the wire for privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequiredValue(int value) { + + privilegesRequired_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * + * @return The privilegesRequired. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired getPrivilegesRequired() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired result = + com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired.valueOf(privilegesRequired_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * + * @param value The privilegesRequired to set. + * @return This builder for chaining. + */ + public Builder setPrivilegesRequired( + com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired value) { + if (value == null) { + throw new NullPointerException(); + } + + privilegesRequired_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric describes the level of privileges an attacker must possess
+     * before successfully exploiting the vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearPrivilegesRequired() { + + privilegesRequired_ = 0; + onChanged(); + return this; + } + + private int userInteraction_ = 0; + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return The enum numeric value on the wire for userInteraction. + */ + @java.lang.Override + public int getUserInteractionValue() { + return userInteraction_; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @param value The enum numeric value on the wire for userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteractionValue(int value) { + + userInteraction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return The userInteraction. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction getUserInteraction() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction result = + com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction.valueOf(userInteraction_); + return result == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @param value The userInteraction to set. + * @return This builder for chaining. + */ + public Builder setUserInteraction( + com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction value) { + if (value == null) { + throw new NullPointerException(); + } + + userInteraction_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric captures the requirement for a human user, other than the
+     * attacker, to participate in the successful compromise of the vulnerable
+     * component.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return This builder for chaining. + */ + public Builder clearUserInteraction() { + + userInteraction_ = 0; + onChanged(); + return this; + } + + private int scope_ = 0; + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @param value The enum numeric value on the wire for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeValue(int value) { + + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Scope getScope() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Scope result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Scope.valueOf(scope_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Scope.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(com.google.cloud.osconfig.v1alpha.CVSSv3.Scope value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Scope metric captures whether a vulnerability in one vulnerable
+     * component impacts resources in components beyond its security scope.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = 0; + onChanged(); + return this; + } + + private int confidentialityImpact_ = 0; + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return The enum numeric value on the wire for confidentialityImpact. + */ + @java.lang.Override + public int getConfidentialityImpactValue() { + return confidentialityImpact_; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @param value The enum numeric value on the wire for confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpactValue(int value) { + + confidentialityImpact_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return The confidentialityImpact. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getConfidentialityImpact() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.valueOf(confidentialityImpact_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @param value The confidentialityImpact to set. + * @return This builder for chaining. + */ + public Builder setConfidentialityImpact(com.google.cloud.osconfig.v1alpha.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + + confidentialityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the confidentiality of the information
+     * resources managed by a software component due to a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return This builder for chaining. + */ + public Builder clearConfidentialityImpact() { + + confidentialityImpact_ = 0; + onChanged(); + return this; + } + + private int integrityImpact_ = 0; + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return The enum numeric value on the wire for integrityImpact. + */ + @java.lang.Override + public int getIntegrityImpactValue() { + return integrityImpact_; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @param value The enum numeric value on the wire for integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpactValue(int value) { + + integrityImpact_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return The integrityImpact. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getIntegrityImpact() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.valueOf(integrityImpact_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @param value The integrityImpact to set. + * @return This builder for chaining. + */ + public Builder setIntegrityImpact(com.google.cloud.osconfig.v1alpha.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + + integrityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to integrity of a successfully exploited
+     * vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return This builder for chaining. + */ + public Builder clearIntegrityImpact() { + + integrityImpact_ = 0; + onChanged(); + return this; + } + + private int availabilityImpact_ = 0; + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return The enum numeric value on the wire for availabilityImpact. + */ + @java.lang.Override + public int getAvailabilityImpactValue() { + return availabilityImpact_; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @param value The enum numeric value on the wire for availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpactValue(int value) { + + availabilityImpact_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return The availabilityImpact. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getAvailabilityImpact() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact result = + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.valueOf(availabilityImpact_); + return result == null ? com.google.cloud.osconfig.v1alpha.CVSSv3.Impact.UNRECOGNIZED : result; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @param value The availabilityImpact to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityImpact(com.google.cloud.osconfig.v1alpha.CVSSv3.Impact value) { + if (value == null) { + throw new NullPointerException(); + } + + availabilityImpact_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric measures the impact to the availability of the impacted
+     * component resulting from a successfully exploited vulnerability.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return This builder for chaining. + */ + public Builder clearAvailabilityImpact() { + + availabilityImpact_ = 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.v1alpha.CVSSv3) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.CVSSv3) + private static final com.google.cloud.osconfig.v1alpha.CVSSv3 DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.CVSSv3(); + } + + public static com.google.cloud.osconfig.v1alpha.CVSSv3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CVSSv3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CVSSv3(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.v1alpha.CVSSv3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3OrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3OrBuilder.java new file mode 100644 index 00000000..fa2deb07 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CVSSv3OrBuilder.java @@ -0,0 +1,287 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface CVSSv3OrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.CVSSv3) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The base score is a function of the base metric scores.
+   * https://www.first.org/cvss/specification-document#Base-Metrics
+   * 
+ * + * float base_score = 1; + * + * @return The baseScore. + */ + float getBaseScore(); + + /** + * + * + *
+   * The Exploitability sub-score equation is derived from the Base
+   * Exploitability metrics.
+   * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics
+   * 
+ * + * float exploitability_score = 2; + * + * @return The exploitabilityScore. + */ + float getExploitabilityScore(); + + /** + * + * + *
+   * The Impact sub-score equation is derived from the Base Impact metrics.
+   * 
+ * + * float impact_score = 3; + * + * @return The impactScore. + */ + float getImpactScore(); + + /** + * + * + *
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return The enum numeric value on the wire for attackVector. + */ + int getAttackVectorValue(); + /** + * + * + *
+   * This metric reflects the context by which vulnerability exploitation is
+   * possible.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackVector attack_vector = 5; + * + * @return The attackVector. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackVector getAttackVector(); + + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return The enum numeric value on the wire for attackComplexity. + */ + int getAttackComplexityValue(); + /** + * + * + *
+   * This metric describes the conditions beyond the attacker's control that
+   * must exist in order to exploit the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity attack_complexity = 6; + * + * @return The attackComplexity. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.AttackComplexity getAttackComplexity(); + + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * @return The enum numeric value on the wire for privilegesRequired. + */ + int getPrivilegesRequiredValue(); + /** + * + * + *
+   * This metric describes the level of privileges an attacker must possess
+   * before successfully exploiting the vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired privileges_required = 7; + * + * @return The privilegesRequired. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.PrivilegesRequired getPrivilegesRequired(); + + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return The enum numeric value on the wire for userInteraction. + */ + int getUserInteractionValue(); + /** + * + * + *
+   * This metric captures the requirement for a human user, other than the
+   * attacker, to participate in the successful compromise of the vulnerable
+   * component.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction user_interaction = 8; + * + * @return The userInteraction. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.UserInteraction getUserInteraction(); + + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return The enum numeric value on the wire for scope. + */ + int getScopeValue(); + /** + * + * + *
+   * The Scope metric captures whether a vulnerability in one vulnerable
+   * component impacts resources in components beyond its security scope.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Scope scope = 9; + * + * @return The scope. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.Scope getScope(); + + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return The enum numeric value on the wire for confidentialityImpact. + */ + int getConfidentialityImpactValue(); + /** + * + * + *
+   * This metric measures the impact to the confidentiality of the information
+   * resources managed by a software component due to a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact confidentiality_impact = 10; + * + * @return The confidentialityImpact. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getConfidentialityImpact(); + + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return The enum numeric value on the wire for integrityImpact. + */ + int getIntegrityImpactValue(); + /** + * + * + *
+   * This metric measures the impact to integrity of a successfully exploited
+   * vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact integrity_impact = 11; + * + * @return The integrityImpact. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getIntegrityImpact(); + + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return The enum numeric value on the wire for availabilityImpact. + */ + int getAvailabilityImpactValue(); + /** + * + * + *
+   * This metric measures the impact to the availability of the impacted
+   * component resulting from a successfully exploited vulnerability.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3.Impact availability_impact = 12; + * + * @return The availabilityImpact. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3.Impact getAvailabilityImpact(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java new file mode 100644 index 00000000..725054f2 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Common.java @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/osconfig_common.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class Common { + private Common() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/osconfig/v1alpha/osconfig" + + "_common.proto\022\035google.cloud.osconfig.v1a" + + "lpha\"<\n\016FixedOrPercent\022\017\n\005fixed\030\001 \001(\005H\000\022" + + "\021\n\007percent\030\002 \001(\005H\000B\006\n\004modeB\327\001\n!com.googl" + + "e.cloud.osconfig.v1alphaB\006CommonP\001ZEgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "osconfig/v1alpha;osconfig\252\002\035Google.Cloud" + + ".OsConfig.V1Alpha\312\002\035Google\\Cloud\\OsConfi" + + "g\\V1alpha\352\002 Google::Cloud::OsConfig::V1a" + + "lphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor, + new java.lang.String[] { + "Fixed", "Percent", "Mode", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java new file mode 100644 index 00000000..67e4be61 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ConfigCommonProto.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/config_common.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class ConfigCommonProto { + private ConfigCommonProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/osconfig/v1alpha/config_c" + + "ommon.proto\022\035google.cloud.osconfig.v1alp" + + "ha\"\245\003\n\032OSPolicyResourceConfigStep\022L\n\004typ" + + "e\030\001 \001(\0162>.google.cloud.osconfig.v1alpha." + + "OSPolicyResourceConfigStep.Type\022R\n\007outco" + + "me\030\002 \001(\0162A.google.cloud.osconfig.v1alpha" + + ".OSPolicyResourceConfigStep.Outcome\022\025\n\re" + + "rror_message\030\003 \001(\t\"\216\001\n\004Type\022\024\n\020TYPE_UNSP" + + "ECIFIED\020\000\022\016\n\nVALIDATION\020\001\022\027\n\023DESIRED_STA" + + "TE_CHECK\020\002\022\035\n\031DESIRED_STATE_ENFORCEMENT\020" + + "\003\022(\n$DESIRED_STATE_CHECK_POST_ENFORCEMEN" + + "T\020\004\"=\n\007Outcome\022\027\n\023OUTCOME_UNSPECIFIED\020\000\022" + + "\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\"\375\002\n\032OSPolicyR" + + "esourceCompliance\022\035\n\025os_policy_resource_" + + "id\030\001 \001(\t\022O\n\014config_steps\030\002 \003(\01329.google." + + "cloud.osconfig.v1alpha.OSPolicyResourceC" + + "onfigStep\022E\n\005state\030\003 \001(\01626.google.cloud." + + "osconfig.v1alpha.OSPolicyComplianceState" + + "\022l\n\024exec_resource_output\030\004 \001(\0132L.google." + + "cloud.osconfig.v1alpha.OSPolicyResourceC" + + "ompliance.ExecResourceOutputH\000\0320\n\022ExecRe" + + "sourceOutput\022\032\n\022enforcement_output\030\002 \001(\014" + + "B\010\n\006output*\223\001\n\027OSPolicyComplianceState\022*" + + "\n&OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED" + + "\020\000\022\r\n\tCOMPLIANT\020\001\022\021\n\rNON_COMPLIANT\020\002\022\013\n\007" + + "UNKNOWN\020\003\022\035\n\031NO_OS_POLICIES_APPLICABLE\020\004" + + "B\342\001\n!com.google.cloud.osconfig.v1alphaB\021" + + "ConfigCommonProtoP\001ZEgoogle.golang.org/g" + + "enproto/googleapis/cloud/osconfig/v1alph" + + "a;osconfig\252\002\035Google.Cloud.OsConfig.V1Alp" + + "ha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 Goo" + + "gle::Cloud::OsConfig::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor, + new java.lang.String[] { + "Type", "Outcome", "ErrorMessage", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor, + new java.lang.String[] { + "OsPolicyResourceId", "ConfigSteps", "State", "ExecResourceOutput", "Output", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_descriptor, + new java.lang.String[] { + "EnforcementOutput", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java new file mode 100644 index 00000000..cb26adbb --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequest.java @@ -0,0 +1,1197 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message to create an OS policy assignment
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} + */ +public final class CreateOSPolicyAssignmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + CreateOSPolicyAssignmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateOSPolicyAssignmentRequest.newBuilder() to construct. + private CreateOSPolicyAssignmentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateOSPolicyAssignmentRequest() { + parent_ = ""; + osPolicyAssignmentId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateOSPolicyAssignmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateOSPolicyAssignmentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder subBuilder = null; + if (osPolicyAssignment_ != null) { + subBuilder = osPolicyAssignment_.toBuilder(); + } + osPolicyAssignment_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(osPolicyAssignment_); + osPolicyAssignment_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + osPolicyAssignmentId_ = 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name in the form:
+   * projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name in the form:
+   * projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICY_ASSIGNMENT_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment osPolicyAssignment_; + /** + * + * + *
+   * Required. The OS policy assignment to be created.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the osPolicyAssignment field is set. + */ + @java.lang.Override + public boolean hasOsPolicyAssignment() { + return osPolicyAssignment_ != null; + } + /** + * + * + *
+   * Required. The OS policy assignment to be created.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The osPolicyAssignment. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignment() { + return osPolicyAssignment_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance() + : osPolicyAssignment_; + } + /** + * + * + *
+   * Required. The OS policy assignment to be created.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentOrBuilder() { + return getOsPolicyAssignment(); + } + + public static final int OS_POLICY_ASSIGNMENT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object osPolicyAssignmentId_; + /** + * + * + *
+   * Required. The logical name of the OS policy assignment in the project
+   * with the following restrictions:
+   * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osPolicyAssignmentId. + */ + @java.lang.Override + public java.lang.String getOsPolicyAssignmentId() { + java.lang.Object ref = osPolicyAssignmentId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignmentId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The logical name of the OS policy assignment in the project
+   * with the following restrictions:
+   * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osPolicyAssignmentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyAssignmentIdBytes() { + java.lang.Object ref = osPolicyAssignmentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignmentId_ = 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 (osPolicyAssignment_ != null) { + output.writeMessage(2, getOsPolicyAssignment()); + } + if (!getOsPolicyAssignmentIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, osPolicyAssignmentId_); + } + 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 (osPolicyAssignment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOsPolicyAssignment()); + } + if (!getOsPolicyAssignmentIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, osPolicyAssignmentId_); + } + 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.v1alpha.CreateOSPolicyAssignmentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest other = + (com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasOsPolicyAssignment() != other.hasOsPolicyAssignment()) return false; + if (hasOsPolicyAssignment()) { + if (!getOsPolicyAssignment().equals(other.getOsPolicyAssignment())) return false; + } + if (!getOsPolicyAssignmentId().equals(other.getOsPolicyAssignmentId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasOsPolicyAssignment()) { + hash = (37 * hash) + OS_POLICY_ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignment().hashCode(); + } + hash = (37 * hash) + OS_POLICY_ASSIGNMENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignmentId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest 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.v1alpha.CreateOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest 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.v1alpha.CreateOSPolicyAssignmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest 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.v1alpha.CreateOSPolicyAssignmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + 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.v1alpha.CreateOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest 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.v1alpha.CreateOSPolicyAssignmentRequest 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 create an OS policy assignment
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignment_ = null; + } else { + osPolicyAssignment_ = null; + osPolicyAssignmentBuilder_ = null; + } + osPolicyAssignmentId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest build() { + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest result = + new com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(this); + result.parent_ = parent_; + if (osPolicyAssignmentBuilder_ == null) { + result.osPolicyAssignment_ = osPolicyAssignment_; + } else { + result.osPolicyAssignment_ = osPolicyAssignmentBuilder_.build(); + } + result.osPolicyAssignmentId_ = osPolicyAssignmentId_; + 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.v1alpha.CreateOSPolicyAssignmentRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasOsPolicyAssignment()) { + mergeOsPolicyAssignment(other.getOsPolicyAssignment()); + } + if (!other.getOsPolicyAssignmentId().isEmpty()) { + osPolicyAssignmentId_ = other.osPolicyAssignmentId_; + 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.v1alpha.CreateOSPolicyAssignmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name in the form:
+     * projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name in the form:
+     * projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource name in the form:
+     * projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name in the form:
+     * projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource name in the form:
+     * projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment osPolicyAssignment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + osPolicyAssignmentBuilder_; + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the osPolicyAssignment field is set. + */ + public boolean hasOsPolicyAssignment() { + return osPolicyAssignmentBuilder_ != null || osPolicyAssignment_ != null; + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The osPolicyAssignment. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignment() { + if (osPolicyAssignmentBuilder_ == null) { + return osPolicyAssignment_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance() + : osPolicyAssignment_; + } else { + return osPolicyAssignmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOsPolicyAssignment( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + osPolicyAssignment_ = value; + onChanged(); + } else { + osPolicyAssignmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOsPolicyAssignment( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignment_ = builderForValue.build(); + onChanged(); + } else { + osPolicyAssignmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOsPolicyAssignment( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentBuilder_ == null) { + if (osPolicyAssignment_ != null) { + osPolicyAssignment_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.newBuilder(osPolicyAssignment_) + .mergeFrom(value) + .buildPartial(); + } else { + osPolicyAssignment_ = value; + } + onChanged(); + } else { + osPolicyAssignmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOsPolicyAssignment() { + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignment_ = null; + onChanged(); + } else { + osPolicyAssignment_ = null; + osPolicyAssignmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + getOsPolicyAssignmentBuilder() { + + onChanged(); + return getOsPolicyAssignmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentOrBuilder() { + if (osPolicyAssignmentBuilder_ != null) { + return osPolicyAssignmentBuilder_.getMessageOrBuilder(); + } else { + return osPolicyAssignment_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance() + : osPolicyAssignment_; + } + } + /** + * + * + *
+     * Required. The OS policy assignment to be created.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + getOsPolicyAssignmentFieldBuilder() { + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder>( + getOsPolicyAssignment(), getParentForChildren(), isClean()); + osPolicyAssignment_ = null; + } + return osPolicyAssignmentBuilder_; + } + + private java.lang.Object osPolicyAssignmentId_ = ""; + /** + * + * + *
+     * Required. The logical name of the OS policy assignment in the project
+     * with the following restrictions:
+     * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osPolicyAssignmentId. + */ + public java.lang.String getOsPolicyAssignmentId() { + java.lang.Object ref = osPolicyAssignmentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignmentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the OS policy assignment in the project
+     * with the following restrictions:
+     * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osPolicyAssignmentId. + */ + public com.google.protobuf.ByteString getOsPolicyAssignmentIdBytes() { + java.lang.Object ref = osPolicyAssignmentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignmentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The logical name of the OS policy assignment in the project
+     * with the following restrictions:
+     * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The osPolicyAssignmentId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignmentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyAssignmentId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the OS policy assignment in the project
+     * with the following restrictions:
+     * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyAssignmentId() { + + osPolicyAssignmentId_ = getDefaultInstance().getOsPolicyAssignmentId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The logical name of the OS policy assignment in the project
+     * with the following restrictions:
+     * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for osPolicyAssignmentId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignmentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyAssignmentId_ = 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.v1alpha.CreateOSPolicyAssignmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + private static final com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateOSPolicyAssignmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateOSPolicyAssignmentRequest(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.v1alpha.CreateOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequestOrBuilder.java new file mode 100644 index 00000000..03986287 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/CreateOSPolicyAssignmentRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface CreateOSPolicyAssignmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.CreateOSPolicyAssignmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name in the form:
+   * projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name in the form:
+   * projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The OS policy assignment to be created.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the osPolicyAssignment field is set. + */ + boolean hasOsPolicyAssignment(); + /** + * + * + *
+   * Required. The OS policy assignment to be created.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The osPolicyAssignment. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignment(); + /** + * + * + *
+   * Required. The OS policy assignment to be created.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder getOsPolicyAssignmentOrBuilder(); + + /** + * + * + *
+   * Required. The logical name of the OS policy assignment in the project
+   * with the following restrictions:
+   * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The osPolicyAssignmentId. + */ + java.lang.String getOsPolicyAssignmentId(); + /** + * + * + *
+   * Required. The logical name of the OS policy assignment in the project
+   * with the following restrictions:
+   * * 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 os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for osPolicyAssignmentId. + */ + com.google.protobuf.ByteString getOsPolicyAssignmentIdBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java new file mode 100644 index 00000000..d82461da --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequest.java @@ -0,0 +1,661 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for deleting a OS policy assignment.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} + */ +public final class DeleteOSPolicyAssignmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + DeleteOSPolicyAssignmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteOSPolicyAssignmentRequest.newBuilder() to construct. + private DeleteOSPolicyAssignmentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteOSPolicyAssignmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteOSPolicyAssignmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteOSPolicyAssignmentRequest( + 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the OS policy assignment to be deleted
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the OS policy assignment to be deleted
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest other = + (com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) 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.v1alpha.DeleteOSPolicyAssignmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest 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.v1alpha.DeleteOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest 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.v1alpha.DeleteOSPolicyAssignmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest 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.v1alpha.DeleteOSPolicyAssignmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + 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.v1alpha.DeleteOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest 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.v1alpha.DeleteOSPolicyAssignmentRequest 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 OS policy assignment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest build() { + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest result = + new com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(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.v1alpha.DeleteOSPolicyAssignmentRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest.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.v1alpha.DeleteOSPolicyAssignmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the OS policy assignment to be deleted
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to be deleted
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to be deleted
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to be deleted
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to be deleted
+     * 
+ * + * + * 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.v1alpha.DeleteOSPolicyAssignmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + private static final com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteOSPolicyAssignmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteOSPolicyAssignmentRequest(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.v1alpha.DeleteOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequestOrBuilder.java new file mode 100644 index 00000000..100e14bd --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/DeleteOSPolicyAssignmentRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface DeleteOSPolicyAssignmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.DeleteOSPolicyAssignmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the OS policy assignment to be deleted
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the OS policy assignment to be deleted
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercent.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercent.java new file mode 100644 index 00000000..bbebaf6a --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercent.java @@ -0,0 +1,808 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/osconfig_common.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * Message encapsulating a value that can be either absolute ("fixed") or
+ * relative ("percent") to a value.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.FixedOrPercent} + */ +public final class FixedOrPercent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.FixedOrPercent) + FixedOrPercentOrBuilder { + private static final long serialVersionUID = 0L; + // Use FixedOrPercent.newBuilder() to construct. + private FixedOrPercent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FixedOrPercent() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FixedOrPercent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FixedOrPercent( + 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: + { + modeCase_ = 1; + mode_ = input.readInt32(); + break; + } + case 16: + { + modeCase_ = 2; + mode_ = 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.v1alpha.Common + .internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Common + .internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.FixedOrPercent.class, + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder.class); + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + + public enum ModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIXED(1), + PERCENT(2), + MODE_NOT_SET(0); + private final int value; + + private ModeCase(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 ModeCase valueOf(int value) { + return forNumber(value); + } + + public static ModeCase forNumber(int value) { + switch (value) { + case 1: + return FIXED; + case 2: + return PERCENT; + case 0: + return MODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public static final int FIXED_FIELD_NUMBER = 1; + /** + * + * + *
+   * Specifies a fixed value.
+   * 
+ * + * int32 fixed = 1; + * + * @return Whether the fixed field is set. + */ + @java.lang.Override + public boolean hasFixed() { + return modeCase_ == 1; + } + /** + * + * + *
+   * Specifies a fixed value.
+   * 
+ * + * int32 fixed = 1; + * + * @return The fixed. + */ + @java.lang.Override + public int getFixed() { + if (modeCase_ == 1) { + return (java.lang.Integer) mode_; + } + return 0; + } + + public static final int PERCENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Specifies the relative value defined as a percentage, which will be
+   * multiplied by a reference value.
+   * 
+ * + * int32 percent = 2; + * + * @return Whether the percent field is set. + */ + @java.lang.Override + public boolean hasPercent() { + return modeCase_ == 2; + } + /** + * + * + *
+   * Specifies the relative value defined as a percentage, which will be
+   * multiplied by a reference value.
+   * 
+ * + * int32 percent = 2; + * + * @return The percent. + */ + @java.lang.Override + public int getPercent() { + if (modeCase_ == 2) { + return (java.lang.Integer) mode_; + } + 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 (modeCase_ == 1) { + output.writeInt32(1, (int) ((java.lang.Integer) mode_)); + } + if (modeCase_ == 2) { + output.writeInt32(2, (int) ((java.lang.Integer) mode_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 1, (int) ((java.lang.Integer) mode_)); + } + if (modeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, (int) ((java.lang.Integer) mode_)); + } + 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.v1alpha.FixedOrPercent)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.FixedOrPercent other = + (com.google.cloud.osconfig.v1alpha.FixedOrPercent) obj; + + if (!getModeCase().equals(other.getModeCase())) return false; + switch (modeCase_) { + case 1: + if (getFixed() != other.getFixed()) return false; + break; + case 2: + if (getPercent() != other.getPercent()) 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 (modeCase_) { + case 1: + hash = (37 * hash) + FIXED_FIELD_NUMBER; + hash = (53 * hash) + getFixed(); + break; + case 2: + hash = (37 * hash) + PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getPercent(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent 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.v1alpha.FixedOrPercent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent 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.v1alpha.FixedOrPercent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent 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.v1alpha.FixedOrPercent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent 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.v1alpha.FixedOrPercent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent 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.v1alpha.FixedOrPercent 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 encapsulating a value that can be either absolute ("fixed") or
+   * relative ("percent") to a value.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.FixedOrPercent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.FixedOrPercent) + com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Common + .internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Common + .internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.FixedOrPercent.class, + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.FixedOrPercent.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(); + modeCase_ = 0; + mode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Common + .internal_static_google_cloud_osconfig_v1alpha_FixedOrPercent_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.FixedOrPercent getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.FixedOrPercent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.FixedOrPercent build() { + com.google.cloud.osconfig.v1alpha.FixedOrPercent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.FixedOrPercent buildPartial() { + com.google.cloud.osconfig.v1alpha.FixedOrPercent result = + new com.google.cloud.osconfig.v1alpha.FixedOrPercent(this); + if (modeCase_ == 1) { + result.mode_ = mode_; + } + if (modeCase_ == 2) { + result.mode_ = mode_; + } + result.modeCase_ = modeCase_; + 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.v1alpha.FixedOrPercent) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.FixedOrPercent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.FixedOrPercent other) { + if (other == com.google.cloud.osconfig.v1alpha.FixedOrPercent.getDefaultInstance()) + return this; + switch (other.getModeCase()) { + case FIXED: + { + setFixed(other.getFixed()); + break; + } + case PERCENT: + { + setPercent(other.getPercent()); + break; + } + case MODE_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.v1alpha.FixedOrPercent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.osconfig.v1alpha.FixedOrPercent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public Builder clearMode() { + modeCase_ = 0; + mode_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return Whether the fixed field is set. + */ + public boolean hasFixed() { + return modeCase_ == 1; + } + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return The fixed. + */ + public int getFixed() { + if (modeCase_ == 1) { + return (java.lang.Integer) mode_; + } + return 0; + } + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @param value The fixed to set. + * @return This builder for chaining. + */ + public Builder setFixed(int value) { + modeCase_ = 1; + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies a fixed value.
+     * 
+ * + * int32 fixed = 1; + * + * @return This builder for chaining. + */ + public Builder clearFixed() { + if (modeCase_ == 1) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return Whether the percent field is set. + */ + public boolean hasPercent() { + return modeCase_ == 2; + } + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return The percent. + */ + public int getPercent() { + if (modeCase_ == 2) { + return (java.lang.Integer) mode_; + } + return 0; + } + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @param value The percent to set. + * @return This builder for chaining. + */ + public Builder setPercent(int value) { + modeCase_ = 2; + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the relative value defined as a percentage, which will be
+     * multiplied by a reference value.
+     * 
+ * + * int32 percent = 2; + * + * @return This builder for chaining. + */ + public Builder clearPercent() { + if (modeCase_ == 2) { + modeCase_ = 0; + mode_ = 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.v1alpha.FixedOrPercent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.FixedOrPercent) + private static final com.google.cloud.osconfig.v1alpha.FixedOrPercent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.FixedOrPercent(); + } + + public static com.google.cloud.osconfig.v1alpha.FixedOrPercent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FixedOrPercent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FixedOrPercent(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.v1alpha.FixedOrPercent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercentOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercentOrBuilder.java new file mode 100644 index 00000000..cd31653d --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/FixedOrPercentOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/osconfig_common.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface FixedOrPercentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.FixedOrPercent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Specifies a fixed value.
+   * 
+ * + * int32 fixed = 1; + * + * @return Whether the fixed field is set. + */ + boolean hasFixed(); + /** + * + * + *
+   * Specifies a fixed value.
+   * 
+ * + * int32 fixed = 1; + * + * @return The fixed. + */ + int getFixed(); + + /** + * + * + *
+   * Specifies the relative value defined as a percentage, which will be
+   * multiplied by a reference value.
+   * 
+ * + * int32 percent = 2; + * + * @return Whether the percent field is set. + */ + boolean hasPercent(); + /** + * + * + *
+   * Specifies the relative value defined as a percentage, which will be
+   * multiplied by a reference value.
+   * 
+ * + * int32 percent = 2; + * + * @return The percent. + */ + int getPercent(); + + public com.google.cloud.osconfig.v1alpha.FixedOrPercent.ModeCase getModeCase(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java new file mode 100644 index 00000000..bd6cc960 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequest.java @@ -0,0 +1,713 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for getting OS policies compliance data for the given
+ * Compute Engine VM instance.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} + */ +public final class GetInstanceOSPoliciesComplianceRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) + GetInstanceOSPoliciesComplianceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstanceOSPoliciesComplianceRequest.newBuilder() to construct. + private GetInstanceOSPoliciesComplianceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceOSPoliciesComplianceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceOSPoliciesComplianceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstanceOSPoliciesComplianceRequest( + 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.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.class, + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. API resource name for instance OS policies compliance resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+   * be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. API resource name for instance OS policies compliance resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+   * be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest other = + (com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) 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.v1alpha.GetInstanceOSPoliciesComplianceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest 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.v1alpha.GetInstanceOSPoliciesComplianceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest 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.v1alpha.GetInstanceOSPoliciesComplianceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest 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.v1alpha.GetInstanceOSPoliciesComplianceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + 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.v1alpha.GetInstanceOSPoliciesComplianceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest 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.v1alpha.GetInstanceOSPoliciesComplianceRequest 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 getting OS policies compliance data for the given
+   * Compute Engine VM instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.class, + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest.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.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest build() { + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest result = + new com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(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.v1alpha.GetInstanceOSPoliciesComplianceRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + .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.v1alpha.GetInstanceOSPoliciesComplianceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. API resource name for instance OS policies compliance resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+     * be provided.
+     * 
+ * + * + * 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. API resource name for instance OS policies compliance resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+     * be provided.
+     * 
+ * + * + * 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. API resource name for instance OS policies compliance resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+     * be provided.
+     * 
+ * + * + * 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. API resource name for instance OS policies compliance resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+     * be provided.
+     * 
+ * + * + * 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. API resource name for instance OS policies compliance resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+     * be provided.
+     * 
+ * + * + * 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.v1alpha.GetInstanceOSPoliciesComplianceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) + private static final com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceOSPoliciesComplianceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstanceOSPoliciesComplianceRequest(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.v1alpha.GetInstanceOSPoliciesComplianceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java new file mode 100644 index 00000000..1286ca24 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInstanceOSPoliciesComplianceRequestOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface GetInstanceOSPoliciesComplianceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.GetInstanceOSPoliciesComplianceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. API resource name for instance OS policies compliance resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+   * be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. API resource name for instance OS policies compliance resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * For `{instance}`, either Compute Engine VM instance-id or instance-name can
+   * be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequest.java new file mode 100644 index 00000000..8ecc7336 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequest.java @@ -0,0 +1,845 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for getting inventory data for the specified VM.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetInventoryRequest} + */ +public final class GetInventoryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.GetInventoryRequest) + GetInventoryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInventoryRequest.newBuilder() to construct. + private GetInventoryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInventoryRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInventoryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInventoryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetInventoryRequest.class, + com.google.cloud.osconfig.v1alpha.GetInventoryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. API resource name for inventory resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. API resource name for inventory resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_; + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InventoryView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.InventoryView result = + com.google.cloud.osconfig.v1alpha.InventoryView.valueOf(view_); + return result == null ? com.google.cloud.osconfig.v1alpha.InventoryView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.osconfig.v1alpha.InventoryView.INVENTORY_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.osconfig.v1alpha.InventoryView.INVENTORY_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.GetInventoryRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.GetInventoryRequest other = + (com.google.cloud.osconfig.v1alpha.GetInventoryRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest 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.v1alpha.GetInventoryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest 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.v1alpha.GetInventoryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest 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.v1alpha.GetInventoryRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest 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.v1alpha.GetInventoryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest 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.v1alpha.GetInventoryRequest 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 getting inventory data for the specified VM.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetInventoryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.GetInventoryRequest) + com.google.cloud.osconfig.v1alpha.GetInventoryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetInventoryRequest.class, + com.google.cloud.osconfig.v1alpha.GetInventoryRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.GetInventoryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetInventoryRequest getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.GetInventoryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetInventoryRequest build() { + com.google.cloud.osconfig.v1alpha.GetInventoryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetInventoryRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.GetInventoryRequest result = + new com.google.cloud.osconfig.v1alpha.GetInventoryRequest(this); + result.name_ = name_; + result.view_ = view_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.GetInventoryRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.GetInventoryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.GetInventoryRequest other) { + if (other == com.google.cloud.osconfig.v1alpha.GetInventoryRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.GetInventoryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.GetInventoryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. API resource name for inventory resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for inventory resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for inventory resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for inventory resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for inventory resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InventoryView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.InventoryView result = + com.google.cloud.osconfig.v1alpha.InventoryView.valueOf(view_); + return result == null ? com.google.cloud.osconfig.v1alpha.InventoryView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.osconfig.v1alpha.InventoryView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.GetInventoryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.GetInventoryRequest) + private static final com.google.cloud.osconfig.v1alpha.GetInventoryRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.GetInventoryRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.GetInventoryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInventoryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInventoryRequest(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.v1alpha.GetInventoryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequestOrBuilder.java new file mode 100644 index 00000000..bae7a205 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetInventoryRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface GetInventoryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.GetInventoryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. API resource name for inventory resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. API resource name for inventory resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/inventory`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine  `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The view. + */ + com.google.cloud.osconfig.v1alpha.InventoryView getView(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java new file mode 100644 index 00000000..87d29626 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequest.java @@ -0,0 +1,671 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message to get an OS policy assignment
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} + */ +public final class GetOSPolicyAssignmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + GetOSPolicyAssignmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetOSPolicyAssignmentRequest.newBuilder() to construct. + private GetOSPolicyAssignmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetOSPolicyAssignmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetOSPolicyAssignmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetOSPolicyAssignmentRequest( + 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of OS policy assignment.
+   * Format:
+   * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of OS policy assignment.
+   * Format:
+   * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest other = + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) 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.v1alpha.GetOSPolicyAssignmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest 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.v1alpha.GetOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest 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.v1alpha.GetOSPolicyAssignmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest 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.v1alpha.GetOSPolicyAssignmentRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest 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.v1alpha.GetOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest 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.v1alpha.GetOSPolicyAssignmentRequest 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 get an OS policy assignment
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest build() { + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest result = + new com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(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.v1alpha.GetOSPolicyAssignmentRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest.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.v1alpha.GetOSPolicyAssignmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of OS policy assignment.
+     * Format:
+     * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+     * 
+ * + * + * 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 OS policy assignment.
+     * Format:
+     * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+     * 
+ * + * + * 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 OS policy assignment.
+     * Format:
+     * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+     * 
+ * + * + * 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 OS policy assignment.
+     * Format:
+     * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+     * 
+ * + * + * 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 OS policy assignment.
+     * Format:
+     * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+     * 
+ * + * + * 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.v1alpha.GetOSPolicyAssignmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + private static final com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOSPolicyAssignmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetOSPolicyAssignmentRequest(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.v1alpha.GetOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequestOrBuilder.java new file mode 100644 index 00000000..90deef8c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetOSPolicyAssignmentRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface GetOSPolicyAssignmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of OS policy assignment.
+   * Format:
+   * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of OS policy assignment.
+   * Format:
+   * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequest.java new file mode 100644 index 00000000..defe463d --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequest.java @@ -0,0 +1,693 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for getting the vulnerability report for the specified VM.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} + */ +public final class GetVulnerabilityReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + GetVulnerabilityReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetVulnerabilityReportRequest.newBuilder() to construct. + private GetVulnerabilityReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetVulnerabilityReportRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetVulnerabilityReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetVulnerabilityReportRequest( + 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.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.class, + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. API resource name for vulnerability resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. API resource name for vulnerability resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest other = + (com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) 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.v1alpha.GetVulnerabilityReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest 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.v1alpha.GetVulnerabilityReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest 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.v1alpha.GetVulnerabilityReportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest 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.v1alpha.GetVulnerabilityReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest 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.v1alpha.GetVulnerabilityReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest 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.v1alpha.GetVulnerabilityReportRequest 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 getting the vulnerability report for the specified VM.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.class, + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.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.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest build() { + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest result = + new com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(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.v1alpha.GetVulnerabilityReportRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest.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.v1alpha.GetVulnerabilityReportRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. API resource name for vulnerability resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for vulnerability resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for vulnerability resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for vulnerability resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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. API resource name for vulnerability resource.
+     * Format:
+     * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+     * can be provided.
+     * 
+ * + * + * 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.v1alpha.GetVulnerabilityReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + private static final com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetVulnerabilityReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetVulnerabilityReportRequest(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.v1alpha.GetVulnerabilityReportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequestOrBuilder.java new file mode 100644 index 00000000..81b1bfc8 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/GetVulnerabilityReportRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface GetVulnerabilityReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.GetVulnerabilityReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. API resource name for vulnerability resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. API resource name for vulnerability resource.
+   * Format:
+   * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, either Compute Engine `instance-id` or `instance-name`
+   * can be provided.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceName.java new file mode 100644 index 00000000..cd5db336 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + project = instanceName.project; + location = instanceName.location; + instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java new file mode 100644 index 00000000..d707666a --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesCompliance.java @@ -0,0 +1,4327 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * This API resource represents the OS policies compliance data for a Compute
+ * Engine virtual machine (VM) instance at a given point in time.
+ * A Compute Engine VM can have multiple OS policy assignments, and each
+ * assignment can have multiple OS policies. As a result, multiple OS policies
+ * could be applied to a single VM.
+ * You can use this API resource to determine both the compliance state of your
+ * VM as well as the compliance state of an individual OS policy.
+ * For more information, see [View
+ * compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance).
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} + */ +public final class InstanceOSPoliciesCompliance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + InstanceOSPoliciesComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceOSPoliciesCompliance.newBuilder() to construct. + private InstanceOSPoliciesCompliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceOSPoliciesCompliance() { + name_ = ""; + instance_ = ""; + state_ = 0; + detailedState_ = ""; + detailedStateReason_ = ""; + osPolicyCompliances_ = java.util.Collections.emptyList(); + lastComplianceRunId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceOSPoliciesCompliance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstanceOSPoliciesCompliance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + detailedState_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + detailedStateReason_ = s; + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyCompliance>(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyCompliances_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyCompliance.parser(), + extensionRegistry)); + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastComplianceCheckTime_ != null) { + subBuilder = lastComplianceCheckTime_.toBuilder(); + } + lastComplianceCheckTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastComplianceCheckTime_); + lastComplianceCheckTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + lastComplianceRunId_ = 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)) { + osPolicyCompliances_ = java.util.Collections.unmodifiableList(osPolicyCompliances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.class, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder.class); + } + + public interface OSPolicyComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The osPolicyId. + */ + java.lang.String getOsPolicyId(); + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The bytes for osPolicyId. + */ + com.google.protobuf.ByteString getOsPolicyIdBytes(); + + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + java.lang.String getOsPolicyAssignment(); + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + com.google.protobuf.ByteString getOsPolicyAssignmentBytes(); + + /** + * + * + *
+     * Compliance state of the OS policy.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Compliance state of the OS policy.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return The state. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState(); + + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + java.util.List + getOsPolicyResourceCompliancesList(); + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance getOsPolicyResourceCompliances( + int index); + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + int getOsPolicyResourceCompliancesCount(); + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + java.util.List + getOsPolicyResourceCompliancesOrBuilderList(); + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder + getOsPolicyResourceCompliancesOrBuilder(int index); + } + /** + * + * + *
+   * Compliance data for an OS policy
+   * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} + */ + public static final class OSPolicyCompliance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + OSPolicyComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyCompliance.newBuilder() to construct. + private OSPolicyCompliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyCompliance() { + osPolicyId_ = ""; + osPolicyAssignment_ = ""; + state_ = 0; + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyCompliance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyCompliance( + 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(); + + osPolicyId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + osPolicyAssignment_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance>(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyResourceCompliances_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .class, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .Builder.class); + } + + public static final int OS_POLICY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object osPolicyId_; + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The osPolicyId. + */ + @java.lang.Override + public java.lang.String getOsPolicyId() { + java.lang.Object ref = osPolicyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyId_ = s; + return s; + } + } + /** + * + * + *
+     * The OS policy id
+     * 
+ * + * string os_policy_id = 1; + * + * @return The bytes for osPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyIdBytes() { + java.lang.Object ref = osPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICY_ASSIGNMENT_FIELD_NUMBER = 2; + private volatile java.lang.Object osPolicyAssignment_; + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + @java.lang.Override + public java.lang.String getOsPolicyAssignment() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignment_ = s; + return s; + } + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+     * belongs to.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyAssignmentBytes() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+     * Compliance state of the OS policy.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Compliance state of the OS policy.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState result = + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.UNRECOGNIZED + : result; + } + + public static final int OS_POLICY_RESOURCE_COMPLIANCES_FIELD_NUMBER = 5; + private java.util.List + osPolicyResourceCompliances_; + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + @java.lang.Override + public java.util.List + getOsPolicyResourceCompliancesList() { + return osPolicyResourceCompliances_; + } + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesOrBuilderList() { + return osPolicyResourceCompliances_; + } + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + @java.lang.Override + public int getOsPolicyResourceCompliancesCount() { + return osPolicyResourceCompliances_.size(); + } + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + getOsPolicyResourceCompliances(int index) { + return osPolicyResourceCompliances_.get(index); + } + /** + * + * + *
+     * Compliance data for each `OSPolicyResource` that is applied to the
+     * VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder + getOsPolicyResourceCompliancesOrBuilder(int index) { + return osPolicyResourceCompliances_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOsPolicyIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osPolicyId_); + } + if (!getOsPolicyAssignmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osPolicyAssignment_); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState + .OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + for (int i = 0; i < osPolicyResourceCompliances_.size(); i++) { + output.writeMessage(5, osPolicyResourceCompliances_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOsPolicyIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osPolicyId_); + } + if (!getOsPolicyAssignmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, osPolicyAssignment_); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState + .OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + for (int i = 0; i < osPolicyResourceCompliances_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, osPolicyResourceCompliances_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance other = + (com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) obj; + + if (!getOsPolicyId().equals(other.getOsPolicyId())) return false; + if (!getOsPolicyAssignment().equals(other.getOsPolicyAssignment())) return false; + if (state_ != other.state_) return false; + if (!getOsPolicyResourceCompliancesList().equals(other.getOsPolicyResourceCompliancesList())) + 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) + OS_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyId().hashCode(); + hash = (37 * hash) + OS_POLICY_ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignment().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getOsPolicyResourceCompliancesCount() > 0) { + hash = (37 * hash) + OS_POLICY_RESOURCE_COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyResourceCompliancesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + 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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + 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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + 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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + 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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + 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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + 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; + } + /** + * + * + *
+     * Compliance data for an OS policy
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .class, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyResourceCompliancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + osPolicyId_ = ""; + + osPolicyAssignment_ = ""; + + state_ = 0; + + if (osPolicyResourceCompliancesBuilder_ == null) { + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyResourceCompliancesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + build() { + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + buildPartial() { + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance result = + new com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance( + this); + int from_bitField0_ = bitField0_; + result.osPolicyId_ = osPolicyId_; + result.osPolicyAssignment_ = osPolicyAssignment_; + result.state_ = state_; + if (osPolicyResourceCompliancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyResourceCompliances_ = osPolicyResourceCompliances_; + } else { + result.osPolicyResourceCompliances_ = osPolicyResourceCompliancesBuilder_.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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance other) { + if (other + == com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .getDefaultInstance()) return this; + if (!other.getOsPolicyId().isEmpty()) { + osPolicyId_ = other.osPolicyId_; + onChanged(); + } + if (!other.getOsPolicyAssignment().isEmpty()) { + osPolicyAssignment_ = other.osPolicyAssignment_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (osPolicyResourceCompliancesBuilder_ == null) { + if (!other.osPolicyResourceCompliances_.isEmpty()) { + if (osPolicyResourceCompliances_.isEmpty()) { + osPolicyResourceCompliances_ = other.osPolicyResourceCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.addAll(other.osPolicyResourceCompliances_); + } + onChanged(); + } + } else { + if (!other.osPolicyResourceCompliances_.isEmpty()) { + if (osPolicyResourceCompliancesBuilder_.isEmpty()) { + osPolicyResourceCompliancesBuilder_.dispose(); + osPolicyResourceCompliancesBuilder_ = null; + osPolicyResourceCompliances_ = other.osPolicyResourceCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyResourceCompliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyResourceCompliancesFieldBuilder() + : null; + } else { + osPolicyResourceCompliancesBuilder_.addAllMessages( + other.osPolicyResourceCompliances_); + } + } + } + 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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object osPolicyId_ = ""; + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @return The osPolicyId. + */ + public java.lang.String getOsPolicyId() { + java.lang.Object ref = osPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @return The bytes for osPolicyId. + */ + public com.google.protobuf.ByteString getOsPolicyIdBytes() { + java.lang.Object ref = osPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @param value The osPolicyId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyId() { + + osPolicyId_ = getDefaultInstance().getOsPolicyId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The OS policy id
+       * 
+ * + * string os_policy_id = 1; + * + * @param value The bytes for osPolicyId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyId_ = value; + onChanged(); + return this; + } + + private java.lang.Object osPolicyAssignment_ = ""; + /** + * + * + *
+       * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+       * belongs to.
+       * Format:
+       * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+       * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + public java.lang.String getOsPolicyAssignment() { + java.lang.Object ref = osPolicyAssignment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+       * belongs to.
+       * Format:
+       * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+       * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + public com.google.protobuf.ByteString getOsPolicyAssignmentBytes() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+       * belongs to.
+       * Format:
+       * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+       * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The osPolicyAssignment to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyAssignment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+       * belongs to.
+       * Format:
+       * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+       * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyAssignment() { + + osPolicyAssignment_ = getDefaultInstance().getOsPolicyAssignment(); + onChanged(); + return this; + } + /** + * + * + *
+       * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy`
+       * belongs to.
+       * Format:
+       * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+       * 
+ * + * string os_policy_assignment = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for osPolicyAssignment to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyAssignment_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+       * Compliance state of the OS policy.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Compliance state of the OS policy.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @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; + } + /** + * + * + *
+       * Compliance state of the OS policy.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState result = + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Compliance state of the OS policy.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Compliance state of the OS policy.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.util.List + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyResourceCompliancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyResourceCompliances_ = + new java.util.ArrayList( + osPolicyResourceCompliances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder> + osPolicyResourceCompliancesBuilder_; + + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public java.util.List + getOsPolicyResourceCompliancesList() { + if (osPolicyResourceCompliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + } else { + return osPolicyResourceCompliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public int getOsPolicyResourceCompliancesCount() { + if (osPolicyResourceCompliancesBuilder_ == null) { + return osPolicyResourceCompliances_.size(); + } else { + return osPolicyResourceCompliancesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + getOsPolicyResourceCompliances(int index) { + if (osPolicyResourceCompliancesBuilder_ == null) { + return osPolicyResourceCompliances_.get(index); + } else { + return osPolicyResourceCompliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder setOsPolicyResourceCompliances( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance value) { + if (osPolicyResourceCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.set(index, value); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder setOsPolicyResourceCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder builderForValue) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder addOsPolicyResourceCompliances( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance value) { + if (osPolicyResourceCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(value); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder addOsPolicyResourceCompliances( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance value) { + if (osPolicyResourceCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(index, value); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder addOsPolicyResourceCompliances( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder builderForValue) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder addOsPolicyResourceCompliances( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder builderForValue) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder addAllOsPolicyResourceCompliances( + java.lang.Iterable + values) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, osPolicyResourceCompliances_); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder clearOsPolicyResourceCompliances() { + if (osPolicyResourceCompliancesBuilder_ == null) { + osPolicyResourceCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public Builder removeOsPolicyResourceCompliances(int index) { + if (osPolicyResourceCompliancesBuilder_ == null) { + ensureOsPolicyResourceCompliancesIsMutable(); + osPolicyResourceCompliances_.remove(index); + onChanged(); + } else { + osPolicyResourceCompliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder + getOsPolicyResourceCompliancesBuilder(int index) { + return getOsPolicyResourceCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder + getOsPolicyResourceCompliancesOrBuilder(int index) { + if (osPolicyResourceCompliancesBuilder_ == null) { + return osPolicyResourceCompliances_.get(index); + } else { + return osPolicyResourceCompliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesOrBuilderList() { + if (osPolicyResourceCompliancesBuilder_ != null) { + return osPolicyResourceCompliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyResourceCompliances_); + } + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder + addOsPolicyResourceCompliancesBuilder() { + return getOsPolicyResourceCompliancesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.getDefaultInstance()); + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder + addOsPolicyResourceCompliancesBuilder(int index) { + return getOsPolicyResourceCompliancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.getDefaultInstance()); + } + /** + * + * + *
+       * Compliance data for each `OSPolicyResource` that is applied to the
+       * VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance os_policy_resource_compliances = 5; + * + */ + public java.util.List + getOsPolicyResourceCompliancesBuilderList() { + return getOsPolicyResourceCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder> + getOsPolicyResourceCompliancesFieldBuilder() { + if (osPolicyResourceCompliancesBuilder_ == null) { + osPolicyResourceCompliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder>( + osPolicyResourceCompliances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyResourceCompliances_ = null; + } + return osPolicyResourceCompliancesBuilder_; + } + + @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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance) + private static final com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyCompliance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance(); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyCompliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyCompliance(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.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 2; + private volatile java.lang.Object instance_; + /** + * + * + *
+   * Output only. The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * Output only. Compliance state of the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Compliance state of the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState result = + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.UNRECOGNIZED + : result; + } + + public static final int DETAILED_STATE_FIELD_NUMBER = 4; + private volatile java.lang.Object detailedState_; + /** + * + * + *
+   * Output only. Detailed compliance state of the VM.
+   * This field is populated only when compliance state is `UNKNOWN`.
+   * It may contain one of the following values:
+   * * `no-compliance-data`: Compliance data is not available for this VM.
+   * * `no-agent-detected`: OS Config agent is not detected for this VM.
+   * * `config-not-supported-by-agent`: The version of the OS Config agent
+   * running on this VM does not support configuration management.
+   * * `inactive`: VM is not running.
+   * * `internal-service-errors`: There were internal service errors encountered
+   * while enforcing compliance.
+   * * `agent-errors`: OS config agent encountered errors while enforcing
+   * compliance.
+   * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detailedState. + */ + @java.lang.Override + public java.lang.String getDetailedState() { + java.lang.Object ref = detailedState_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detailedState_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Detailed compliance state of the VM.
+   * This field is populated only when compliance state is `UNKNOWN`.
+   * It may contain one of the following values:
+   * * `no-compliance-data`: Compliance data is not available for this VM.
+   * * `no-agent-detected`: OS Config agent is not detected for this VM.
+   * * `config-not-supported-by-agent`: The version of the OS Config agent
+   * running on this VM does not support configuration management.
+   * * `inactive`: VM is not running.
+   * * `internal-service-errors`: There were internal service errors encountered
+   * while enforcing compliance.
+   * * `agent-errors`: OS config agent encountered errors while enforcing
+   * compliance.
+   * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detailedState. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailedStateBytes() { + java.lang.Object ref = detailedState_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detailedState_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAILED_STATE_REASON_FIELD_NUMBER = 5; + private volatile java.lang.Object detailedStateReason_; + /** + * + * + *
+   * Output only. The reason for the `detailed_state` of the VM (if any).
+   * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detailedStateReason. + */ + @java.lang.Override + public java.lang.String getDetailedStateReason() { + java.lang.Object ref = detailedStateReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detailedStateReason_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The reason for the `detailed_state` of the VM (if any).
+   * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detailedStateReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailedStateReasonBytes() { + java.lang.Object ref = detailedStateReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detailedStateReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICY_COMPLIANCES_FIELD_NUMBER = 6; + private java.util.List< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance> + osPolicyCompliances_; + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance> + getOsPolicyCompliancesList() { + return osPolicyCompliances_; + } + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesOrBuilderList() { + return osPolicyCompliances_; + } + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getOsPolicyCompliancesCount() { + return osPolicyCompliances_.size(); + } + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + getOsPolicyCompliances(int index) { + return osPolicyCompliances_.get(index); + } + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder + getOsPolicyCompliancesOrBuilder(int index) { + return osPolicyCompliances_.get(index); + } + + public static final int LAST_COMPLIANCE_CHECK_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp lastComplianceCheckTime_; + /** + * + * + *
+   * Output only. Timestamp of the last compliance check for the VM.
+   * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastComplianceCheckTime field is set. + */ + @java.lang.Override + public boolean hasLastComplianceCheckTime() { + return lastComplianceCheckTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp of the last compliance check for the VM.
+   * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastComplianceCheckTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastComplianceCheckTime() { + return lastComplianceCheckTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastComplianceCheckTime_; + } + /** + * + * + *
+   * Output only. Timestamp of the last compliance check for the VM.
+   * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastComplianceCheckTimeOrBuilder() { + return getLastComplianceCheckTime(); + } + + public static final int LAST_COMPLIANCE_RUN_ID_FIELD_NUMBER = 8; + private volatile java.lang.Object lastComplianceRunId_; + /** + * + * + *
+   * Output only. Unique identifier for the last compliance run.
+   * This id will be logged by the OS config agent during a compliance run and
+   * can be used for debugging and tracing purpose.
+   * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastComplianceRunId. + */ + @java.lang.Override + public java.lang.String getLastComplianceRunId() { + java.lang.Object ref = lastComplianceRunId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastComplianceRunId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier for the last compliance run.
+   * This id will be logged by the OS config agent during a compliance run and
+   * can be used for debugging and tracing purpose.
+   * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for lastComplianceRunId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastComplianceRunIdBytes() { + java.lang.Object ref = lastComplianceRunId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastComplianceRunId_ = 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 (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instance_); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState + .OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, state_); + } + if (!getDetailedStateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, detailedState_); + } + if (!getDetailedStateReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, detailedStateReason_); + } + for (int i = 0; i < osPolicyCompliances_.size(); i++) { + output.writeMessage(6, osPolicyCompliances_.get(i)); + } + if (lastComplianceCheckTime_ != null) { + output.writeMessage(7, getLastComplianceCheckTime()); + } + if (!getLastComplianceRunIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, lastComplianceRunId_); + } + 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 (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instance_); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState + .OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (!getDetailedStateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, detailedState_); + } + if (!getDetailedStateReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, detailedStateReason_); + } + for (int i = 0; i < osPolicyCompliances_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, osPolicyCompliances_.get(i)); + } + if (lastComplianceCheckTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getLastComplianceCheckTime()); + } + if (!getLastComplianceRunIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, lastComplianceRunId_); + } + 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.v1alpha.InstanceOSPoliciesCompliance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance other = + (com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) obj; + + if (!getName().equals(other.getName())) return false; + if (!getInstance().equals(other.getInstance())) return false; + if (state_ != other.state_) return false; + if (!getDetailedState().equals(other.getDetailedState())) return false; + if (!getDetailedStateReason().equals(other.getDetailedStateReason())) return false; + if (!getOsPolicyCompliancesList().equals(other.getOsPolicyCompliancesList())) return false; + if (hasLastComplianceCheckTime() != other.hasLastComplianceCheckTime()) return false; + if (hasLastComplianceCheckTime()) { + if (!getLastComplianceCheckTime().equals(other.getLastComplianceCheckTime())) return false; + } + if (!getLastComplianceRunId().equals(other.getLastComplianceRunId())) 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_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DETAILED_STATE_FIELD_NUMBER; + hash = (53 * hash) + getDetailedState().hashCode(); + hash = (37 * hash) + DETAILED_STATE_REASON_FIELD_NUMBER; + hash = (53 * hash) + getDetailedStateReason().hashCode(); + if (getOsPolicyCompliancesCount() > 0) { + hash = (37 * hash) + OS_POLICY_COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyCompliancesList().hashCode(); + } + if (hasLastComplianceCheckTime()) { + hash = (37 * hash) + LAST_COMPLIANCE_CHECK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastComplianceCheckTime().hashCode(); + } + hash = (37 * hash) + LAST_COMPLIANCE_RUN_ID_FIELD_NUMBER; + hash = (53 * hash) + getLastComplianceRunId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance 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.v1alpha.InstanceOSPoliciesCompliance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance 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.v1alpha.InstanceOSPoliciesCompliance parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance 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.v1alpha.InstanceOSPoliciesCompliance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance 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.v1alpha.InstanceOSPoliciesCompliance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance 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.v1alpha.InstanceOSPoliciesCompliance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * This API resource represents the OS policies compliance data for a Compute
+   * Engine virtual machine (VM) instance at a given point in time.
+   * A Compute Engine VM can have multiple OS policy assignments, and each
+   * assignment can have multiple OS policies. As a result, multiple OS policies
+   * could be applied to a single VM.
+   * You can use this API resource to determine both the compliance state of your
+   * VM as well as the compliance state of an individual OS policy.
+   * For more information, see [View
+   * compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.class, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyCompliancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + instance_ = ""; + + state_ = 0; + + detailedState_ = ""; + + detailedStateReason_ = ""; + + if (osPolicyCompliancesBuilder_ == null) { + osPolicyCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyCompliancesBuilder_.clear(); + } + if (lastComplianceCheckTimeBuilder_ == null) { + lastComplianceCheckTime_ = null; + } else { + lastComplianceCheckTime_ = null; + lastComplianceCheckTimeBuilder_ = null; + } + lastComplianceRunId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance build() { + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance buildPartial() { + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance result = + new com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.instance_ = instance_; + result.state_ = state_; + result.detailedState_ = detailedState_; + result.detailedStateReason_ = detailedStateReason_; + if (osPolicyCompliancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = java.util.Collections.unmodifiableList(osPolicyCompliances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyCompliances_ = osPolicyCompliances_; + } else { + result.osPolicyCompliances_ = osPolicyCompliancesBuilder_.build(); + } + if (lastComplianceCheckTimeBuilder_ == null) { + result.lastComplianceCheckTime_ = lastComplianceCheckTime_; + } else { + result.lastComplianceCheckTime_ = lastComplianceCheckTimeBuilder_.build(); + } + result.lastComplianceRunId_ = lastComplianceRunId_; + 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.v1alpha.InstanceOSPoliciesCompliance) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance other) { + if (other + == com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getDetailedState().isEmpty()) { + detailedState_ = other.detailedState_; + onChanged(); + } + if (!other.getDetailedStateReason().isEmpty()) { + detailedStateReason_ = other.detailedStateReason_; + onChanged(); + } + if (osPolicyCompliancesBuilder_ == null) { + if (!other.osPolicyCompliances_.isEmpty()) { + if (osPolicyCompliances_.isEmpty()) { + osPolicyCompliances_ = other.osPolicyCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.addAll(other.osPolicyCompliances_); + } + onChanged(); + } + } else { + if (!other.osPolicyCompliances_.isEmpty()) { + if (osPolicyCompliancesBuilder_.isEmpty()) { + osPolicyCompliancesBuilder_.dispose(); + osPolicyCompliancesBuilder_ = null; + osPolicyCompliances_ = other.osPolicyCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyCompliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyCompliancesFieldBuilder() + : null; + } else { + osPolicyCompliancesBuilder_.addAllMessages(other.osPolicyCompliances_); + } + } + } + if (other.hasLastComplianceCheckTime()) { + mergeLastComplianceCheckTime(other.getLastComplianceCheckTime()); + } + if (!other.getLastComplianceRunId().isEmpty()) { + lastComplianceRunId_ = other.lastComplianceRunId_; + 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.v1alpha.InstanceOSPoliciesCompliance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+     * Output only. The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Compute Engine VM instance name.
+     * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Compliance state of the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Compliance state of the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Compliance state of the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState result = + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Compliance state of the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Compliance state of the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object detailedState_ = ""; + /** + * + * + *
+     * Output only. Detailed compliance state of the VM.
+     * This field is populated only when compliance state is `UNKNOWN`.
+     * It may contain one of the following values:
+     * * `no-compliance-data`: Compliance data is not available for this VM.
+     * * `no-agent-detected`: OS Config agent is not detected for this VM.
+     * * `config-not-supported-by-agent`: The version of the OS Config agent
+     * running on this VM does not support configuration management.
+     * * `inactive`: VM is not running.
+     * * `internal-service-errors`: There were internal service errors encountered
+     * while enforcing compliance.
+     * * `agent-errors`: OS config agent encountered errors while enforcing
+     * compliance.
+     * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detailedState. + */ + public java.lang.String getDetailedState() { + java.lang.Object ref = detailedState_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detailedState_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Detailed compliance state of the VM.
+     * This field is populated only when compliance state is `UNKNOWN`.
+     * It may contain one of the following values:
+     * * `no-compliance-data`: Compliance data is not available for this VM.
+     * * `no-agent-detected`: OS Config agent is not detected for this VM.
+     * * `config-not-supported-by-agent`: The version of the OS Config agent
+     * running on this VM does not support configuration management.
+     * * `inactive`: VM is not running.
+     * * `internal-service-errors`: There were internal service errors encountered
+     * while enforcing compliance.
+     * * `agent-errors`: OS config agent encountered errors while enforcing
+     * compliance.
+     * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detailedState. + */ + public com.google.protobuf.ByteString getDetailedStateBytes() { + java.lang.Object ref = detailedState_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detailedState_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Detailed compliance state of the VM.
+     * This field is populated only when compliance state is `UNKNOWN`.
+     * It may contain one of the following values:
+     * * `no-compliance-data`: Compliance data is not available for this VM.
+     * * `no-agent-detected`: OS Config agent is not detected for this VM.
+     * * `config-not-supported-by-agent`: The version of the OS Config agent
+     * running on this VM does not support configuration management.
+     * * `inactive`: VM is not running.
+     * * `internal-service-errors`: There were internal service errors encountered
+     * while enforcing compliance.
+     * * `agent-errors`: OS config agent encountered errors while enforcing
+     * compliance.
+     * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The detailedState to set. + * @return This builder for chaining. + */ + public Builder setDetailedState(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + detailedState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Detailed compliance state of the VM.
+     * This field is populated only when compliance state is `UNKNOWN`.
+     * It may contain one of the following values:
+     * * `no-compliance-data`: Compliance data is not available for this VM.
+     * * `no-agent-detected`: OS Config agent is not detected for this VM.
+     * * `config-not-supported-by-agent`: The version of the OS Config agent
+     * running on this VM does not support configuration management.
+     * * `inactive`: VM is not running.
+     * * `internal-service-errors`: There were internal service errors encountered
+     * while enforcing compliance.
+     * * `agent-errors`: OS config agent encountered errors while enforcing
+     * compliance.
+     * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDetailedState() { + + detailedState_ = getDefaultInstance().getDetailedState(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Detailed compliance state of the VM.
+     * This field is populated only when compliance state is `UNKNOWN`.
+     * It may contain one of the following values:
+     * * `no-compliance-data`: Compliance data is not available for this VM.
+     * * `no-agent-detected`: OS Config agent is not detected for this VM.
+     * * `config-not-supported-by-agent`: The version of the OS Config agent
+     * running on this VM does not support configuration management.
+     * * `inactive`: VM is not running.
+     * * `internal-service-errors`: There were internal service errors encountered
+     * while enforcing compliance.
+     * * `agent-errors`: OS config agent encountered errors while enforcing
+     * compliance.
+     * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for detailedState to set. + * @return This builder for chaining. + */ + public Builder setDetailedStateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + detailedState_ = value; + onChanged(); + return this; + } + + private java.lang.Object detailedStateReason_ = ""; + /** + * + * + *
+     * Output only. The reason for the `detailed_state` of the VM (if any).
+     * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detailedStateReason. + */ + public java.lang.String getDetailedStateReason() { + java.lang.Object ref = detailedStateReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detailedStateReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The reason for the `detailed_state` of the VM (if any).
+     * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detailedStateReason. + */ + public com.google.protobuf.ByteString getDetailedStateReasonBytes() { + java.lang.Object ref = detailedStateReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detailedStateReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The reason for the `detailed_state` of the VM (if any).
+     * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The detailedStateReason to set. + * @return This builder for chaining. + */ + public Builder setDetailedStateReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + detailedStateReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reason for the `detailed_state` of the VM (if any).
+     * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDetailedStateReason() { + + detailedStateReason_ = getDefaultInstance().getDetailedStateReason(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reason for the `detailed_state` of the VM (if any).
+     * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for detailedStateReason to set. + * @return This builder for chaining. + */ + public Builder setDetailedStateReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + detailedStateReason_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance> + osPolicyCompliances_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyCompliancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance>( + osPolicyCompliances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .Builder, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder> + osPolicyCompliancesBuilder_; + + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance> + getOsPolicyCompliancesList() { + if (osPolicyCompliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyCompliances_); + } else { + return osPolicyCompliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getOsPolicyCompliancesCount() { + if (osPolicyCompliancesBuilder_ == null) { + return osPolicyCompliances_.size(); + } else { + return osPolicyCompliancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + getOsPolicyCompliances(int index) { + if (osPolicyCompliancesBuilder_ == null) { + return osPolicyCompliances_.get(index); + } else { + return osPolicyCompliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance value) { + if (osPolicyCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.set(index, value); + onChanged(); + } else { + osPolicyCompliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.Builder + builderForValue) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyCompliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addOsPolicyCompliances( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance value) { + if (osPolicyCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(value); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance value) { + if (osPolicyCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(index, value); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addOsPolicyCompliances( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.Builder + builderForValue) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addOsPolicyCompliances( + int index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.Builder + builderForValue) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllOsPolicyCompliances( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyCompliance> + values) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osPolicyCompliances_); + onChanged(); + } else { + osPolicyCompliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOsPolicyCompliances() { + if (osPolicyCompliancesBuilder_ == null) { + osPolicyCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyCompliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeOsPolicyCompliances(int index) { + if (osPolicyCompliancesBuilder_ == null) { + ensureOsPolicyCompliancesIsMutable(); + osPolicyCompliances_.remove(index); + onChanged(); + } else { + osPolicyCompliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.Builder + getOsPolicyCompliancesBuilder(int index) { + return getOsPolicyCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder + getOsPolicyCompliancesOrBuilder(int index) { + if (osPolicyCompliancesBuilder_ == null) { + return osPolicyCompliances_.get(index); + } else { + return osPolicyCompliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesOrBuilderList() { + if (osPolicyCompliancesBuilder_ != null) { + return osPolicyCompliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyCompliances_); + } + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.Builder + addOsPolicyCompliancesBuilder() { + return getOsPolicyCompliancesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance.Builder + addOsPolicyCompliancesBuilder(int index) { + return getOsPolicyCompliancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .Builder> + getOsPolicyCompliancesBuilderList() { + return getOsPolicyCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .Builder, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesFieldBuilder() { + if (osPolicyCompliancesBuilder_ == null) { + osPolicyCompliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + .Builder, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder>( + osPolicyCompliances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyCompliances_ = null; + } + return osPolicyCompliancesBuilder_; + } + + private com.google.protobuf.Timestamp lastComplianceCheckTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastComplianceCheckTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastComplianceCheckTime field is set. + */ + public boolean hasLastComplianceCheckTime() { + return lastComplianceCheckTimeBuilder_ != null || lastComplianceCheckTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastComplianceCheckTime. + */ + public com.google.protobuf.Timestamp getLastComplianceCheckTime() { + if (lastComplianceCheckTimeBuilder_ == null) { + return lastComplianceCheckTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastComplianceCheckTime_; + } else { + return lastComplianceCheckTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastComplianceCheckTime(com.google.protobuf.Timestamp value) { + if (lastComplianceCheckTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastComplianceCheckTime_ = value; + onChanged(); + } else { + lastComplianceCheckTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastComplianceCheckTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastComplianceCheckTimeBuilder_ == null) { + lastComplianceCheckTime_ = builderForValue.build(); + onChanged(); + } else { + lastComplianceCheckTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastComplianceCheckTime(com.google.protobuf.Timestamp value) { + if (lastComplianceCheckTimeBuilder_ == null) { + if (lastComplianceCheckTime_ != null) { + lastComplianceCheckTime_ = + com.google.protobuf.Timestamp.newBuilder(lastComplianceCheckTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastComplianceCheckTime_ = value; + } + onChanged(); + } else { + lastComplianceCheckTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastComplianceCheckTime() { + if (lastComplianceCheckTimeBuilder_ == null) { + lastComplianceCheckTime_ = null; + onChanged(); + } else { + lastComplianceCheckTime_ = null; + lastComplianceCheckTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastComplianceCheckTimeBuilder() { + + onChanged(); + return getLastComplianceCheckTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastComplianceCheckTimeOrBuilder() { + if (lastComplianceCheckTimeBuilder_ != null) { + return lastComplianceCheckTimeBuilder_.getMessageOrBuilder(); + } else { + return lastComplianceCheckTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastComplianceCheckTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp of the last compliance check for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastComplianceCheckTimeFieldBuilder() { + if (lastComplianceCheckTimeBuilder_ == null) { + lastComplianceCheckTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastComplianceCheckTime(), getParentForChildren(), isClean()); + lastComplianceCheckTime_ = null; + } + return lastComplianceCheckTimeBuilder_; + } + + private java.lang.Object lastComplianceRunId_ = ""; + /** + * + * + *
+     * Output only. Unique identifier for the last compliance run.
+     * This id will be logged by the OS config agent during a compliance run and
+     * can be used for debugging and tracing purpose.
+     * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastComplianceRunId. + */ + public java.lang.String getLastComplianceRunId() { + java.lang.Object ref = lastComplianceRunId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastComplianceRunId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier for the last compliance run.
+     * This id will be logged by the OS config agent during a compliance run and
+     * can be used for debugging and tracing purpose.
+     * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for lastComplianceRunId. + */ + public com.google.protobuf.ByteString getLastComplianceRunIdBytes() { + java.lang.Object ref = lastComplianceRunId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastComplianceRunId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier for the last compliance run.
+     * This id will be logged by the OS config agent during a compliance run and
+     * can be used for debugging and tracing purpose.
+     * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The lastComplianceRunId to set. + * @return This builder for chaining. + */ + public Builder setLastComplianceRunId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lastComplianceRunId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier for the last compliance run.
+     * This id will be logged by the OS config agent during a compliance run and
+     * can be used for debugging and tracing purpose.
+     * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLastComplianceRunId() { + + lastComplianceRunId_ = getDefaultInstance().getLastComplianceRunId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier for the last compliance run.
+     * This id will be logged by the OS config agent during a compliance run and
+     * can be used for debugging and tracing purpose.
+     * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for lastComplianceRunId to set. + * @return This builder for chaining. + */ + public Builder setLastComplianceRunIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lastComplianceRunId_ = 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.v1alpha.InstanceOSPoliciesCompliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + private static final com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance(); + } + + public static com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceOSPoliciesCompliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstanceOSPoliciesCompliance(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.v1alpha.InstanceOSPoliciesCompliance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceName.java new file mode 100644 index 00000000..bd370228 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceOSPoliciesComplianceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceOSPoliciesComplianceName() { + project = null; + location = null; + instance = null; + } + + private InstanceOSPoliciesComplianceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceOSPoliciesComplianceName of( + String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceOSPoliciesComplianceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, + "InstanceOSPoliciesComplianceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceOSPoliciesComplianceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InstanceOSPoliciesComplianceName that = ((InstanceOSPoliciesComplianceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}. + */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceOSPoliciesComplianceName instanceOSPoliciesComplianceName) { + project = instanceOSPoliciesComplianceName.project; + location = instanceOSPoliciesComplianceName.location; + instance = instanceOSPoliciesComplianceName.instance; + } + + public InstanceOSPoliciesComplianceName build() { + return new InstanceOSPoliciesComplianceName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java new file mode 100644 index 00000000..8798d94d --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceOrBuilder.java @@ -0,0 +1,318 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface InstanceOSPoliciesComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The `InstanceOSPoliciesCompliance` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+   * Output only. The Compute Engine VM instance name.
+   * 
+ * + * string instance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * Output only. Compliance state of the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Compliance state of the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState(); + + /** + * + * + *
+   * Output only. Detailed compliance state of the VM.
+   * This field is populated only when compliance state is `UNKNOWN`.
+   * It may contain one of the following values:
+   * * `no-compliance-data`: Compliance data is not available for this VM.
+   * * `no-agent-detected`: OS Config agent is not detected for this VM.
+   * * `config-not-supported-by-agent`: The version of the OS Config agent
+   * running on this VM does not support configuration management.
+   * * `inactive`: VM is not running.
+   * * `internal-service-errors`: There were internal service errors encountered
+   * while enforcing compliance.
+   * * `agent-errors`: OS config agent encountered errors while enforcing
+   * compliance.
+   * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detailedState. + */ + java.lang.String getDetailedState(); + /** + * + * + *
+   * Output only. Detailed compliance state of the VM.
+   * This field is populated only when compliance state is `UNKNOWN`.
+   * It may contain one of the following values:
+   * * `no-compliance-data`: Compliance data is not available for this VM.
+   * * `no-agent-detected`: OS Config agent is not detected for this VM.
+   * * `config-not-supported-by-agent`: The version of the OS Config agent
+   * running on this VM does not support configuration management.
+   * * `inactive`: VM is not running.
+   * * `internal-service-errors`: There were internal service errors encountered
+   * while enforcing compliance.
+   * * `agent-errors`: OS config agent encountered errors while enforcing
+   * compliance.
+   * 
+ * + * string detailed_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detailedState. + */ + com.google.protobuf.ByteString getDetailedStateBytes(); + + /** + * + * + *
+   * Output only. The reason for the `detailed_state` of the VM (if any).
+   * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detailedStateReason. + */ + java.lang.String getDetailedStateReason(); + /** + * + * + *
+   * Output only. The reason for the `detailed_state` of the VM (if any).
+   * 
+ * + * string detailed_state_reason = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detailedStateReason. + */ + com.google.protobuf.ByteString getDetailedStateReasonBytes(); + + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getOsPolicyCompliancesList(); + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance + getOsPolicyCompliances(int index); + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getOsPolicyCompliancesCount(); + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + .OSPolicyComplianceOrBuilder> + getOsPolicyCompliancesOrBuilderList(); + /** + * + * + *
+   * Output only. Compliance data for each `OSPolicy` that is applied to the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyCompliance os_policy_compliances = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.OSPolicyComplianceOrBuilder + getOsPolicyCompliancesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Timestamp of the last compliance check for the VM.
+   * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastComplianceCheckTime field is set. + */ + boolean hasLastComplianceCheckTime(); + /** + * + * + *
+   * Output only. Timestamp of the last compliance check for the VM.
+   * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastComplianceCheckTime. + */ + com.google.protobuf.Timestamp getLastComplianceCheckTime(); + /** + * + * + *
+   * Output only. Timestamp of the last compliance check for the VM.
+   * 
+ * + * + * .google.protobuf.Timestamp last_compliance_check_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastComplianceCheckTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Unique identifier for the last compliance run.
+   * This id will be logged by the OS config agent during a compliance run and
+   * can be used for debugging and tracing purpose.
+   * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The lastComplianceRunId. + */ + java.lang.String getLastComplianceRunId(); + /** + * + * + *
+   * Output only. Unique identifier for the last compliance run.
+   * This id will be logged by the OS config agent during a compliance run and
+   * can be used for debugging and tracing purpose.
+   * 
+ * + * string last_compliance_run_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for lastComplianceRunId. + */ + com.google.protobuf.ByteString getLastComplianceRunIdBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java new file mode 100644 index 00000000..4d39cdb4 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InstanceOSPoliciesComplianceProto.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class InstanceOSPoliciesComplianceProto { + private InstanceOSPoliciesComplianceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nCgoogle/cloud/osconfig/v1alpha/instance" + + "_os_policies_compliance.proto\022\035google.cl" + + "oud.osconfig.v1alpha\032\037google/api/field_b" + + "ehavior.proto\032\031google/api/resource.proto" + + "\0321google/cloud/osconfig/v1alpha/config_c" + + "ommon.proto\032\037google/protobuf/timestamp.p" + + "roto\"\350\006\n\034InstanceOSPoliciesCompliance\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\022\025\n\010instance\030\002 \001(\tB\003\340A\003\022" + + "J\n\005state\030\003 \001(\01626.google.cloud.osconfig.v" + + "1alpha.OSPolicyComplianceStateB\003\340A\003\022\033\n\016d" + + "etailed_state\030\004 \001(\tB\003\340A\003\022\"\n\025detailed_sta" + + "te_reason\030\005 \001(\tB\003\340A\003\022r\n\025os_policy_compli" + + "ances\030\006 \003(\0132N.google.cloud.osconfig.v1al" + + "pha.InstanceOSPoliciesCompliance.OSPolic" + + "yComplianceB\003\340A\003\022C\n\032last_compliance_chec" + + "k_time\030\007 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\022#\n\026last_compliance_run_id\030\010 \001(\tB\003\340" + + "A\003\032\243\002\n\022OSPolicyCompliance\022\024\n\014os_policy_i" + + "d\030\001 \001(\t\022M\n\024os_policy_assignment\030\002 \001(\tB/\372" + + "A,\n*osconfig.googleapis.com/OSPolicyAssi" + + "gnment\022E\n\005state\030\004 \001(\01626.google.cloud.osc" + + "onfig.v1alpha.OSPolicyComplianceState\022a\n" + + "\036os_policy_resource_compliances\030\005 \003(\01329." + + "google.cloud.osconfig.v1alpha.OSPolicyRe" + + "sourceCompliance:\214\001\352A\210\001\n4osconfig.google" + + "apis.com/InstanceOSPoliciesCompliance\022Pp" + + "rojects/{project}/locations/{location}/i" + + "nstanceOSPoliciesCompliances/{instance}\"" + + "t\n&GetInstanceOSPoliciesComplianceReques" + + "t\022J\n\004name\030\001 \001(\tB<\340A\002\372A6\n4osconfig.google" + + "apis.com/InstanceOSPoliciesCompliance\"\234\001" + + "\n(ListInstanceOSPoliciesCompliancesReque" + + "st\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.go" + + "ogleapis.com/Location\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\"\253\001\n" + + ")ListInstanceOSPoliciesCompliancesRespon" + + "se\022e\n instance_os_policies_compliances\030\001" + + " \003(\0132;.google.cloud.osconfig.v1alpha.Ins" + + "tanceOSPoliciesCompliance\022\027\n\017next_page_t" + + "oken\030\002 \001(\tB\362\001\n!com.google.cloud.osconfig" + + ".v1alphaB!InstanceOSPoliciesCompliancePr" + + "otoP\001ZEgoogle.golang.org/genproto/google" + + "apis/cloud/osconfig/v1alpha;osconfig\252\002\035G" + + "oogle.Cloud.OsConfig.V1Alpha\312\002\035Google\\Cl" + + "oud\\OsConfig\\V1alpha\352\002 Google::Cloud::Os" + + "Config::V1alphab\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.v1alpha.ConfigCommonProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor, + new java.lang.String[] { + "Name", + "Instance", + "State", + "DetailedState", + "DetailedStateReason", + "OsPolicyCompliances", + "LastComplianceCheckTime", + "LastComplianceRunId", + }); + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_descriptor = + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_InstanceOSPoliciesCompliance_OSPolicyCompliance_descriptor, + new java.lang.String[] { + "OsPolicyId", "OsPolicyAssignment", "State", "OsPolicyResourceCompliances", + }); + internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_GetInstanceOSPoliciesComplianceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_descriptor, + new java.lang.String[] { + "InstanceOsPoliciesCompliances", "NextPageToken", + }); + 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.v1alpha.ConfigCommonProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java new file mode 100644 index 00000000..1188e91c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventories.java @@ -0,0 +1,338 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class Inventories { + private Inventories() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_Inventory_ItemsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_Inventory_ItemsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_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/v1alpha/inventor" + + "y.proto\022\035google.cloud.osconfig.v1alpha\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\032\037google/protobuf/time" + + "stamp.proto\"\306\024\n\tInventory\022\021\n\004name\030\003 \001(\tB" + + "\003\340A\003\022E\n\007os_info\030\001 \001(\0132/.google.cloud.osc" + + "onfig.v1alpha.Inventory.OsInfoB\003\340A\003\022G\n\005i" + + "tems\030\002 \003(\01323.google.cloud.osconfig.v1alp" + + "ha.Inventory.ItemsEntryB\003\340A\003\0224\n\013update_t" + + "ime\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\032\270\001\n\006OsInfo\022\020\n\010hostname\030\t \001(\t\022\021\n\tlong_" + + "name\030\002 \001(\t\022\022\n\nshort_name\030\003 \001(\t\022\017\n\007versio" + + "n\030\004 \001(\t\022\024\n\014architecture\030\005 \001(\t\022\026\n\016kernel_" + + "version\030\006 \001(\t\022\026\n\016kernel_release\030\007 \001(\t\022\036\n" + + "\026osconfig_agent_version\030\010 \001(\t\032\313\004\n\004Item\022\n" + + "\n\002id\030\001 \001(\t\022M\n\013origin_type\030\002 \001(\01628.google" + + ".cloud.osconfig.v1alpha.Inventory.Item.O" + + "riginType\022/\n\013create_time\030\010 \001(\0132\032.google." + + "protobuf.Timestamp\022/\n\013update_time\030\t \001(\0132" + + "\032.google.protobuf.Timestamp\022@\n\004type\030\005 \001(" + + "\01622.google.cloud.osconfig.v1alpha.Invent" + + "ory.Item.Type\022U\n\021installed_package\030\006 \001(\013" + + "28.google.cloud.osconfig.v1alpha.Invento" + + "ry.SoftwarePackageH\000\022U\n\021available_packag" + + "e\030\007 \001(\01328.google.cloud.osconfig.v1alpha." + + "Inventory.SoftwarePackageH\000\"?\n\nOriginTyp" + + "e\022\033\n\027ORIGIN_TYPE_UNSPECIFIED\020\000\022\024\n\020INVENT" + + "ORY_REPORT\020\001\"J\n\004Type\022\024\n\020TYPE_UNSPECIFIED" + + "\020\000\022\025\n\021INSTALLED_PACKAGE\020\001\022\025\n\021AVAILABLE_P" + + "ACKAGE\020\002B\t\n\007details\032\303\005\n\017SoftwarePackage\022" + + "P\n\013yum_package\030\001 \001(\01329.google.cloud.osco" + + "nfig.v1alpha.Inventory.VersionedPackageH" + + "\000\022P\n\013apt_package\030\002 \001(\01329.google.cloud.os" + + "config.v1alpha.Inventory.VersionedPackag" + + "eH\000\022S\n\016zypper_package\030\003 \001(\01329.google.clo" + + "ud.osconfig.v1alpha.Inventory.VersionedP" + + "ackageH\000\022S\n\016googet_package\030\004 \001(\01329.googl" + + "e.cloud.osconfig.v1alpha.Inventory.Versi" + + "onedPackageH\000\022L\n\014zypper_patch\030\005 \001(\01324.go" + + "ogle.cloud.osconfig.v1alpha.Inventory.Zy" + + "pperPatchH\000\022T\n\013wua_package\030\006 \001(\0132=.googl" + + "e.cloud.osconfig.v1alpha.Inventory.Windo" + + "wsUpdatePackageH\000\022a\n\013qfe_package\030\007 \001(\0132J" + + ".google.cloud.osconfig.v1alpha.Inventory" + + ".WindowsQuickFixEngineeringPackageH\000\022P\n\013" + + "cos_package\030\010 \001(\01329.google.cloud.osconfi" + + "g.v1alpha.Inventory.VersionedPackageH\000B\t" + + "\n\007details\032O\n\020VersionedPackage\022\024\n\014package" + + "_name\030\004 \001(\t\022\024\n\014architecture\030\002 \001(\t\022\017\n\007ver" + + "sion\030\003 \001(\t\032V\n\013ZypperPatch\022\022\n\npatch_name\030" + + "\005 \001(\t\022\020\n\010category\030\002 \001(\t\022\020\n\010severity\030\003 \001(" + + "\t\022\017\n\007summary\030\004 \001(\t\032\210\003\n\024WindowsUpdatePack" + + "age\022\r\n\005title\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022" + + "g\n\ncategories\030\003 \003(\0132S.google.cloud.oscon" + + "fig.v1alpha.Inventory.WindowsUpdatePacka" + + "ge.WindowsUpdateCategory\022\026\n\016kb_article_i" + + "ds\030\004 \003(\t\022\023\n\013support_url\030\013 \001(\t\022\026\n\016more_in" + + "fo_urls\030\005 \003(\t\022\021\n\tupdate_id\030\006 \001(\t\022\027\n\017revi" + + "sion_number\030\007 \001(\005\022?\n\033last_deployment_cha" + + "nge_time\030\n \001(\0132\032.google.protobuf.Timesta" + + "mp\0321\n\025WindowsUpdateCategory\022\n\n\002id\030\001 \001(\t\022" + + "\014\n\004name\030\002 \001(\t\032\217\001\n!WindowsQuickFixEnginee" + + "ringPackage\022\017\n\007caption\030\001 \001(\t\022\023\n\013descript" + + "ion\030\002 \001(\t\022\022\n\nhot_fix_id\030\003 \001(\t\0220\n\014install" + + "_time\030\005 \001(\0132\032.google.protobuf.Timestamp\032" + + "[\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(" + + "\0132-.google.cloud.osconfig.v1alpha.Invent" + + "ory.Item:\0028\001:n\352Ak\n!osconfig.googleapis.c" + + "om/Inventory\022Fprojects/{project}/locatio" + + "ns/{location}/instances/{instance}/inven" + + "tory\"\212\001\n\023GetInventoryRequest\0227\n\004name\030\001 \001" + + "(\tB)\340A\002\372A#\n!osconfig.googleapis.com/Inve" + + "ntory\022:\n\004view\030\002 \001(\0162,.google.cloud.oscon" + + "fig.v1alpha.InventoryView\"\304\001\n\026ListInvent" + + "oriesRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037co" + + "mpute.googleapis.com/Instance\022:\n\004view\030\002 " + + "\001(\0162,.google.cloud.osconfig.v1alpha.Inve" + + "ntoryView\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_tok" + + "en\030\004 \001(\t\022\016\n\006filter\030\005 \001(\t\"q\n\027ListInventor" + + "iesResponse\022=\n\013inventories\030\001 \003(\0132(.googl" + + "e.cloud.osconfig.v1alpha.Inventory\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t*D\n\rInventoryView\022\036\n\032" + + "INVENTORY_VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022" + + "\010\n\004FULL\020\002B\334\001\n!com.google.cloud.osconfig." + + "v1alphaB\013InventoriesP\001ZEgoogle.golang.or" + + "g/genproto/googleapis/cloud/osconfig/v1a" + + "lpha;osconfig\252\002\035Google.Cloud.OsConfig.V1" + + "Alpha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 " + + "Google::Cloud::OsConfig::V1alphab\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.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_Inventory_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor, + new java.lang.String[] { + "Name", "OsInfo", "Items", "UpdateTime", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_descriptor, + new java.lang.String[] { + "Hostname", + "LongName", + "ShortName", + "Version", + "Architecture", + "KernelVersion", + "KernelRelease", + "OsconfigAgentVersion", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_descriptor, + new java.lang.String[] { + "Id", + "OriginType", + "CreateTime", + "UpdateTime", + "Type", + "InstalledPackage", + "AvailablePackage", + "Details", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_descriptor, + new java.lang.String[] { + "YumPackage", + "AptPackage", + "ZypperPackage", + "GoogetPackage", + "ZypperPatch", + "WuaPackage", + "QfePackage", + "CosPackage", + "Details", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_descriptor, + new java.lang.String[] { + "PackageName", "Architecture", "Version", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_descriptor, + new java.lang.String[] { + "PatchName", "Category", "Severity", "Summary", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor, + new java.lang.String[] { + "Title", + "Description", + "Categories", + "KbArticleIds", + "SupportUrl", + "MoreInfoUrls", + "UpdateId", + "RevisionNumber", + "LastDeploymentChangeTime", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_descriptor, + new java.lang.String[] { + "Id", "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(6); + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_descriptor, + new java.lang.String[] { + "Caption", "Description", "HotFixId", "InstallTime", + }); + internal_static_google_cloud_osconfig_v1alpha_Inventory_ItemsEntry_descriptor = + internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor.getNestedTypes().get(7); + internal_static_google_cloud_osconfig_v1alpha_Inventory_ItemsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_Inventory_ItemsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_GetInventoryRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_descriptor, + new java.lang.String[] { + "Parent", "View", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_descriptor, + new java.lang.String[] { + "Inventories", "NextPageToken", + }); + 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.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java new file mode 100644 index 00000000..99b16606 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/Inventory.java @@ -0,0 +1,17906 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * This API resource represents the available inventory data for a
+ * Compute Engine virtual machine (VM) instance at a given point in time.
+ * You can use this API resource to determine the inventory data of your VM.
+ * For more information, see [Information provided by OS inventory
+ * management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory} + */ +public final class Inventory extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory) + InventoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Inventory.newBuilder() to construct. + private Inventory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Inventory() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Inventory(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Inventory( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder subBuilder = null; + if (osInfo_ != null) { + subBuilder = osInfo_.toBuilder(); + } + osInfo_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(osInfo_); + osInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + items_ = + com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + items_.getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + 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; + } + 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetItems(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.class, + com.google.cloud.osconfig.v1alpha.Inventory.Builder.class); + } + + public interface OsInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.OsInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The VM hostname.
+     * 
+ * + * string hostname = 9; + * + * @return The hostname. + */ + java.lang.String getHostname(); + /** + * + * + *
+     * The VM hostname.
+     * 
+ * + * string hostname = 9; + * + * @return The bytes for hostname. + */ + com.google.protobuf.ByteString getHostnameBytes(); + + /** + * + * + *
+     * The operating system long name.
+     * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+     * Datacenter'.
+     * 
+ * + * string long_name = 2; + * + * @return The longName. + */ + java.lang.String getLongName(); + /** + * + * + *
+     * The operating system long name.
+     * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+     * Datacenter'.
+     * 
+ * + * string long_name = 2; + * + * @return The bytes for longName. + */ + com.google.protobuf.ByteString getLongNameBytes(); + + /** + * + * + *
+     * The operating system short name.
+     * For example, 'windows' or 'debian'.
+     * 
+ * + * string short_name = 3; + * + * @return The shortName. + */ + java.lang.String getShortName(); + /** + * + * + *
+     * The operating system short name.
+     * For example, 'windows' or 'debian'.
+     * 
+ * + * string short_name = 3; + * + * @return The bytes for shortName. + */ + com.google.protobuf.ByteString getShortNameBytes(); + + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 4; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * The system architecture of the operating system.
+     * 
+ * + * string architecture = 5; + * + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + * + * + *
+     * The system architecture of the operating system.
+     * 
+ * + * string architecture = 5; + * + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString getArchitectureBytes(); + + /** + * + * + *
+     * The kernel version of the operating system.
+     * 
+ * + * string kernel_version = 6; + * + * @return The kernelVersion. + */ + java.lang.String getKernelVersion(); + /** + * + * + *
+     * The kernel version of the operating system.
+     * 
+ * + * string kernel_version = 6; + * + * @return The bytes for kernelVersion. + */ + com.google.protobuf.ByteString getKernelVersionBytes(); + + /** + * + * + *
+     * The kernel release of the operating system.
+     * 
+ * + * string kernel_release = 7; + * + * @return The kernelRelease. + */ + java.lang.String getKernelRelease(); + /** + * + * + *
+     * The kernel release of the operating system.
+     * 
+ * + * string kernel_release = 7; + * + * @return The bytes for kernelRelease. + */ + com.google.protobuf.ByteString getKernelReleaseBytes(); + + /** + * + * + *
+     * The current version of the OS Config agent running on the VM.
+     * 
+ * + * string osconfig_agent_version = 8; + * + * @return The osconfigAgentVersion. + */ + java.lang.String getOsconfigAgentVersion(); + /** + * + * + *
+     * The current version of the OS Config agent running on the VM.
+     * 
+ * + * string osconfig_agent_version = 8; + * + * @return The bytes for osconfigAgentVersion. + */ + com.google.protobuf.ByteString getOsconfigAgentVersionBytes(); + } + /** + * + * + *
+   * Operating system information for the VM.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.OsInfo} + */ + public static final class OsInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.OsInfo) + OsInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use OsInfo.newBuilder() to construct. + private OsInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OsInfo() { + hostname_ = ""; + longName_ = ""; + shortName_ = ""; + version_ = ""; + architecture_ = ""; + kernelVersion_ = ""; + kernelRelease_ = ""; + osconfigAgentVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OsInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OsInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + longName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + shortName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + kernelVersion_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + kernelRelease_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + osconfigAgentVersion_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + hostname_ = 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.class, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder.class); + } + + public static final int HOSTNAME_FIELD_NUMBER = 9; + private volatile java.lang.Object hostname_; + /** + * + * + *
+     * The VM hostname.
+     * 
+ * + * string hostname = 9; + * + * @return The hostname. + */ + @java.lang.Override + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostname_ = s; + return s; + } + } + /** + * + * + *
+     * The VM hostname.
+     * 
+ * + * string hostname = 9; + * + * @return The bytes for hostname. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LONG_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object longName_; + /** + * + * + *
+     * The operating system long name.
+     * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+     * Datacenter'.
+     * 
+ * + * string long_name = 2; + * + * @return The longName. + */ + @java.lang.Override + public java.lang.String getLongName() { + java.lang.Object ref = longName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longName_ = s; + return s; + } + } + /** + * + * + *
+     * The operating system long name.
+     * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+     * Datacenter'.
+     * 
+ * + * string long_name = 2; + * + * @return The bytes for longName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLongNameBytes() { + java.lang.Object ref = longName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHORT_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object shortName_; + /** + * + * + *
+     * The operating system short name.
+     * For example, 'windows' or 'debian'.
+     * 
+ * + * string short_name = 3; + * + * @return The shortName. + */ + @java.lang.Override + public java.lang.String getShortName() { + java.lang.Object ref = shortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortName_ = s; + return s; + } + } + /** + * + * + *
+     * The operating system short name.
+     * For example, 'windows' or 'debian'.
+     * 
+ * + * string short_name = 3; + * + * @return The bytes for shortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getShortNameBytes() { + java.lang.Object ref = shortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + private volatile java.lang.Object version_; + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 4; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The version of the operating system.
+     * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 5; + private volatile java.lang.Object architecture_; + /** + * + * + *
+     * The system architecture of the operating system.
+     * 
+ * + * string architecture = 5; + * + * @return The architecture. + */ + @java.lang.Override + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } + } + /** + * + * + *
+     * The system architecture of the operating system.
+     * 
+ * + * string architecture = 5; + * + * @return The bytes for architecture. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KERNEL_VERSION_FIELD_NUMBER = 6; + private volatile java.lang.Object kernelVersion_; + /** + * + * + *
+     * The kernel version of the operating system.
+     * 
+ * + * string kernel_version = 6; + * + * @return The kernelVersion. + */ + @java.lang.Override + public java.lang.String getKernelVersion() { + java.lang.Object ref = kernelVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelVersion_ = s; + return s; + } + } + /** + * + * + *
+     * The kernel version of the operating system.
+     * 
+ * + * string kernel_version = 6; + * + * @return The bytes for kernelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKernelVersionBytes() { + java.lang.Object ref = kernelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kernelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KERNEL_RELEASE_FIELD_NUMBER = 7; + private volatile java.lang.Object kernelRelease_; + /** + * + * + *
+     * The kernel release of the operating system.
+     * 
+ * + * string kernel_release = 7; + * + * @return The kernelRelease. + */ + @java.lang.Override + public java.lang.String getKernelRelease() { + java.lang.Object ref = kernelRelease_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelRelease_ = s; + return s; + } + } + /** + * + * + *
+     * The kernel release of the operating system.
+     * 
+ * + * string kernel_release = 7; + * + * @return The bytes for kernelRelease. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKernelReleaseBytes() { + java.lang.Object ref = kernelRelease_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kernelRelease_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OSCONFIG_AGENT_VERSION_FIELD_NUMBER = 8; + private volatile java.lang.Object osconfigAgentVersion_; + /** + * + * + *
+     * The current version of the OS Config agent running on the VM.
+     * 
+ * + * string osconfig_agent_version = 8; + * + * @return The osconfigAgentVersion. + */ + @java.lang.Override + public java.lang.String getOsconfigAgentVersion() { + java.lang.Object ref = osconfigAgentVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osconfigAgentVersion_ = s; + return s; + } + } + /** + * + * + *
+     * The current version of the OS Config agent running on the VM.
+     * 
+ * + * string osconfig_agent_version = 8; + * + * @return The bytes for osconfigAgentVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsconfigAgentVersionBytes() { + java.lang.Object ref = osconfigAgentVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osconfigAgentVersion_ = 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 (!getLongNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, longName_); + } + if (!getShortNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, shortName_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + if (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, architecture_); + } + if (!getKernelVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, kernelVersion_); + } + if (!getKernelReleaseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, kernelRelease_); + } + if (!getOsconfigAgentVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, osconfigAgentVersion_); + } + if (!getHostnameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, hostname_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getLongNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, longName_); + } + if (!getShortNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, shortName_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, architecture_); + } + if (!getKernelVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, kernelVersion_); + } + if (!getKernelReleaseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, kernelRelease_); + } + if (!getOsconfigAgentVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, osconfigAgentVersion_); + } + if (!getHostnameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, hostname_); + } + 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.v1alpha.Inventory.OsInfo)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo other = + (com.google.cloud.osconfig.v1alpha.Inventory.OsInfo) obj; + + if (!getHostname().equals(other.getHostname())) return false; + if (!getLongName().equals(other.getLongName())) return false; + if (!getShortName().equals(other.getShortName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getArchitecture().equals(other.getArchitecture())) return false; + if (!getKernelVersion().equals(other.getKernelVersion())) return false; + if (!getKernelRelease().equals(other.getKernelRelease())) return false; + if (!getOsconfigAgentVersion().equals(other.getOsconfigAgentVersion())) 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) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + hash = (37 * hash) + LONG_NAME_FIELD_NUMBER; + hash = (53 * hash) + getLongName().hashCode(); + hash = (37 * hash) + SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getShortName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (37 * hash) + KERNEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getKernelVersion().hashCode(); + hash = (37 * hash) + KERNEL_RELEASE_FIELD_NUMBER; + hash = (53 * hash) + getKernelRelease().hashCode(); + hash = (37 * hash) + OSCONFIG_AGENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsconfigAgentVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo 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.v1alpha.Inventory.OsInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo 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.v1alpha.Inventory.OsInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo 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.v1alpha.Inventory.OsInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo 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.v1alpha.Inventory.OsInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo 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.v1alpha.Inventory.OsInfo 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; + } + /** + * + * + *
+     * Operating system information for the VM.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.OsInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.OsInfo) + com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.class, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.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(); + hostname_ = ""; + + longName_ = ""; + + shortName_ = ""; + + version_ = ""; + + architecture_ = ""; + + kernelVersion_ = ""; + + kernelRelease_ = ""; + + osconfigAgentVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_OsInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfo getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfo build() { + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfo buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo result = + new com.google.cloud.osconfig.v1alpha.Inventory.OsInfo(this); + result.hostname_ = hostname_; + result.longName_ = longName_; + result.shortName_ = shortName_; + result.version_ = version_; + result.architecture_ = architecture_; + result.kernelVersion_ = kernelVersion_; + result.kernelRelease_ = kernelRelease_; + result.osconfigAgentVersion_ = osconfigAgentVersion_; + 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.v1alpha.Inventory.OsInfo) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.Inventory.OsInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.Inventory.OsInfo other) { + if (other == com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.getDefaultInstance()) + return this; + if (!other.getHostname().isEmpty()) { + hostname_ = other.hostname_; + onChanged(); + } + if (!other.getLongName().isEmpty()) { + longName_ = other.longName_; + onChanged(); + } + if (!other.getShortName().isEmpty()) { + shortName_ = other.shortName_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + if (!other.getKernelVersion().isEmpty()) { + kernelVersion_ = other.kernelVersion_; + onChanged(); + } + if (!other.getKernelRelease().isEmpty()) { + kernelRelease_ = other.kernelRelease_; + onChanged(); + } + if (!other.getOsconfigAgentVersion().isEmpty()) { + osconfigAgentVersion_ = other.osconfigAgentVersion_; + 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.v1alpha.Inventory.OsInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.OsInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object hostname_ = ""; + /** + * + * + *
+       * The VM hostname.
+       * 
+ * + * string hostname = 9; + * + * @return The hostname. + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The VM hostname.
+       * 
+ * + * string hostname = 9; + * + * @return The bytes for hostname. + */ + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The VM hostname.
+       * 
+ * + * string hostname = 9; + * + * @param value The hostname to set. + * @return This builder for chaining. + */ + public Builder setHostname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hostname_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The VM hostname.
+       * 
+ * + * string hostname = 9; + * + * @return This builder for chaining. + */ + public Builder clearHostname() { + + hostname_ = getDefaultInstance().getHostname(); + onChanged(); + return this; + } + /** + * + * + *
+       * The VM hostname.
+       * 
+ * + * string hostname = 9; + * + * @param value The bytes for hostname to set. + * @return This builder for chaining. + */ + public Builder setHostnameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hostname_ = value; + onChanged(); + return this; + } + + private java.lang.Object longName_ = ""; + /** + * + * + *
+       * The operating system long name.
+       * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+       * Datacenter'.
+       * 
+ * + * string long_name = 2; + * + * @return The longName. + */ + public java.lang.String getLongName() { + java.lang.Object ref = longName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + longName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The operating system long name.
+       * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+       * Datacenter'.
+       * 
+ * + * string long_name = 2; + * + * @return The bytes for longName. + */ + public com.google.protobuf.ByteString getLongNameBytes() { + java.lang.Object ref = longName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + longName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The operating system long name.
+       * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+       * Datacenter'.
+       * 
+ * + * string long_name = 2; + * + * @param value The longName to set. + * @return This builder for chaining. + */ + public Builder setLongName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + longName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The operating system long name.
+       * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+       * Datacenter'.
+       * 
+ * + * string long_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearLongName() { + + longName_ = getDefaultInstance().getLongName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The operating system long name.
+       * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
+       * Datacenter'.
+       * 
+ * + * string long_name = 2; + * + * @param value The bytes for longName to set. + * @return This builder for chaining. + */ + public Builder setLongNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + longName_ = value; + onChanged(); + return this; + } + + private java.lang.Object shortName_ = ""; + /** + * + * + *
+       * The operating system short name.
+       * For example, 'windows' or 'debian'.
+       * 
+ * + * string short_name = 3; + * + * @return The shortName. + */ + public java.lang.String getShortName() { + java.lang.Object ref = shortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shortName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The operating system short name.
+       * For example, 'windows' or 'debian'.
+       * 
+ * + * string short_name = 3; + * + * @return The bytes for shortName. + */ + public com.google.protobuf.ByteString getShortNameBytes() { + java.lang.Object ref = shortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + shortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The operating system short name.
+       * For example, 'windows' or 'debian'.
+       * 
+ * + * string short_name = 3; + * + * @param value The shortName to set. + * @return This builder for chaining. + */ + public Builder setShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + shortName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The operating system short name.
+       * For example, 'windows' or 'debian'.
+       * 
+ * + * string short_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearShortName() { + + shortName_ = getDefaultInstance().getShortName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The operating system short name.
+       * For example, 'windows' or 'debian'.
+       * 
+ * + * string short_name = 3; + * + * @param value The bytes for shortName to set. + * @return This builder for chaining. + */ + public Builder setShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + shortName_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The version of the operating system.
+       * 
+ * + * string version = 4; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The version of the operating system.
+       * 
+ * + * string version = 4; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The version of the operating system.
+       * 
+ * + * string version = 4; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the operating system.
+       * 
+ * + * string version = 4; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the operating system.
+       * 
+ * + * string version = 4; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object architecture_ = ""; + /** + * + * + *
+       * The system architecture of the operating system.
+       * 
+ * + * string architecture = 5; + * + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The system architecture of the operating system.
+       * 
+ * + * string architecture = 5; + * + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The system architecture of the operating system.
+       * 
+ * + * string architecture = 5; + * + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The system architecture of the operating system.
+       * 
+ * + * string architecture = 5; + * + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + * + * + *
+       * The system architecture of the operating system.
+       * 
+ * + * string architecture = 5; + * + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + + private java.lang.Object kernelVersion_ = ""; + /** + * + * + *
+       * The kernel version of the operating system.
+       * 
+ * + * string kernel_version = 6; + * + * @return The kernelVersion. + */ + public java.lang.String getKernelVersion() { + java.lang.Object ref = kernelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The kernel version of the operating system.
+       * 
+ * + * string kernel_version = 6; + * + * @return The bytes for kernelVersion. + */ + public com.google.protobuf.ByteString getKernelVersionBytes() { + java.lang.Object ref = kernelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kernelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The kernel version of the operating system.
+       * 
+ * + * string kernel_version = 6; + * + * @param value The kernelVersion to set. + * @return This builder for chaining. + */ + public Builder setKernelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kernelVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The kernel version of the operating system.
+       * 
+ * + * string kernel_version = 6; + * + * @return This builder for chaining. + */ + public Builder clearKernelVersion() { + + kernelVersion_ = getDefaultInstance().getKernelVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The kernel version of the operating system.
+       * 
+ * + * string kernel_version = 6; + * + * @param value The bytes for kernelVersion to set. + * @return This builder for chaining. + */ + public Builder setKernelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kernelVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object kernelRelease_ = ""; + /** + * + * + *
+       * The kernel release of the operating system.
+       * 
+ * + * string kernel_release = 7; + * + * @return The kernelRelease. + */ + public java.lang.String getKernelRelease() { + java.lang.Object ref = kernelRelease_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kernelRelease_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The kernel release of the operating system.
+       * 
+ * + * string kernel_release = 7; + * + * @return The bytes for kernelRelease. + */ + public com.google.protobuf.ByteString getKernelReleaseBytes() { + java.lang.Object ref = kernelRelease_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kernelRelease_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The kernel release of the operating system.
+       * 
+ * + * string kernel_release = 7; + * + * @param value The kernelRelease to set. + * @return This builder for chaining. + */ + public Builder setKernelRelease(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kernelRelease_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The kernel release of the operating system.
+       * 
+ * + * string kernel_release = 7; + * + * @return This builder for chaining. + */ + public Builder clearKernelRelease() { + + kernelRelease_ = getDefaultInstance().getKernelRelease(); + onChanged(); + return this; + } + /** + * + * + *
+       * The kernel release of the operating system.
+       * 
+ * + * string kernel_release = 7; + * + * @param value The bytes for kernelRelease to set. + * @return This builder for chaining. + */ + public Builder setKernelReleaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kernelRelease_ = value; + onChanged(); + return this; + } + + private java.lang.Object osconfigAgentVersion_ = ""; + /** + * + * + *
+       * The current version of the OS Config agent running on the VM.
+       * 
+ * + * string osconfig_agent_version = 8; + * + * @return The osconfigAgentVersion. + */ + public java.lang.String getOsconfigAgentVersion() { + java.lang.Object ref = osconfigAgentVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osconfigAgentVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The current version of the OS Config agent running on the VM.
+       * 
+ * + * string osconfig_agent_version = 8; + * + * @return The bytes for osconfigAgentVersion. + */ + public com.google.protobuf.ByteString getOsconfigAgentVersionBytes() { + java.lang.Object ref = osconfigAgentVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osconfigAgentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The current version of the OS Config agent running on the VM.
+       * 
+ * + * string osconfig_agent_version = 8; + * + * @param value The osconfigAgentVersion to set. + * @return This builder for chaining. + */ + public Builder setOsconfigAgentVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osconfigAgentVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The current version of the OS Config agent running on the VM.
+       * 
+ * + * string osconfig_agent_version = 8; + * + * @return This builder for chaining. + */ + public Builder clearOsconfigAgentVersion() { + + osconfigAgentVersion_ = getDefaultInstance().getOsconfigAgentVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The current version of the OS Config agent running on the VM.
+       * 
+ * + * string osconfig_agent_version = 8; + * + * @param value The bytes for osconfigAgentVersion to set. + * @return This builder for chaining. + */ + public Builder setOsconfigAgentVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osconfigAgentVersion_ = 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.v1alpha.Inventory.OsInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.OsInfo) + private static final com.google.cloud.osconfig.v1alpha.Inventory.OsInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory.OsInfo(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.OsInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OsInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OsInfo(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.v1alpha.Inventory.OsInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.Item) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Identifier for this item, unique across items for this VM.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Identifier for this item, unique across items for this VM.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * The origin of this inventory item.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return The enum numeric value on the wire for originType. + */ + int getOriginTypeValue(); + /** + * + * + *
+     * The origin of this inventory item.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return The originType. + */ + com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType getOriginType(); + + /** + * + * + *
+     * When this inventory item was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * When this inventory item was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * When this inventory item was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * When this inventory item was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * When this inventory item was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * When this inventory item was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * The specific type of inventory, correlating to its specific details.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * The specific type of inventory, correlating to its specific details.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return The type. + */ + com.google.cloud.osconfig.v1alpha.Inventory.Item.Type getType(); + + /** + * + * + *
+     * Software package present on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + * @return Whether the installedPackage field is set. + */ + boolean hasInstalledPackage(); + /** + * + * + *
+     * Software package present on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + * @return The installedPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getInstalledPackage(); + /** + * + * + *
+     * Software package present on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + */ + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder + getInstalledPackageOrBuilder(); + + /** + * + * + *
+     * Software package available to be installed on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + * @return Whether the availablePackage field is set. + */ + boolean hasAvailablePackage(); + /** + * + * + *
+     * Software package available to be installed on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + * @return The availablePackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getAvailablePackage(); + /** + * + * + *
+     * Software package available to be installed on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + */ + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder + getAvailablePackageOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.Inventory.Item.DetailsCase getDetailsCase(); + } + /** + * + * + *
+   * A single piece of inventory on a VM.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.Item} + */ + public static final class Item extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.Item) + ItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use Item.newBuilder() to construct. + private Item(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Item() { + id_ = ""; + originType_ = 0; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Item(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Item( + 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(); + + id_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + originType_ = rawValue; + break; + } + case 40: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 50: + { + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder subBuilder = + null; + if (detailsCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder subBuilder = + null; + if (detailsCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 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; + } + 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.Item.class, + com.google.cloud.osconfig.v1alpha.Inventory.Item.Builder.class); + } + + /** + * + * + *
+     * The origin of a specific inventory item.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.Inventory.Item.OriginType} + */ + public enum OriginType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Invalid. An origin type must be specified.
+       * 
+ * + * ORIGIN_TYPE_UNSPECIFIED = 0; + */ + ORIGIN_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * This inventory item was discovered as the result of the agent
+       * reporting inventory via the reporting API.
+       * 
+ * + * INVENTORY_REPORT = 1; + */ + INVENTORY_REPORT(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Invalid. An origin type must be specified.
+       * 
+ * + * ORIGIN_TYPE_UNSPECIFIED = 0; + */ + public static final int ORIGIN_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * This inventory item was discovered as the result of the agent
+       * reporting inventory via the reporting API.
+       * 
+ * + * INVENTORY_REPORT = 1; + */ + public static final int INVENTORY_REPORT_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OriginType 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 OriginType forNumber(int value) { + switch (value) { + case 0: + return ORIGIN_TYPE_UNSPECIFIED; + case 1: + return INVENTORY_REPORT; + 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 OriginType findValueByNumber(int number) { + return OriginType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventory.Item.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OriginType[] VALUES = values(); + + public static OriginType 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 OriginType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.Inventory.Item.OriginType) + } + + /** + * + * + *
+     * The different types of inventory that are tracked on a VM.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.Inventory.Item.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Invalid. An type must be specified.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * This represents a package that is installed on the VM.
+       * 
+ * + * INSTALLED_PACKAGE = 1; + */ + INSTALLED_PACKAGE(1), + /** + * + * + *
+       * This represents an update that is available for a package.
+       * 
+ * + * AVAILABLE_PACKAGE = 2; + */ + AVAILABLE_PACKAGE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Invalid. An type must be specified.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * This represents a package that is installed on the VM.
+       * 
+ * + * INSTALLED_PACKAGE = 1; + */ + public static final int INSTALLED_PACKAGE_VALUE = 1; + /** + * + * + *
+       * This represents an update that is available for a package.
+       * 
+ * + * AVAILABLE_PACKAGE = 2; + */ + public static final int AVAILABLE_PACKAGE_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 INSTALLED_PACKAGE; + case 2: + return AVAILABLE_PACKAGE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventory.Item.getDescriptor() + .getEnumTypes() + .get(1); + } + + 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.v1alpha.Inventory.Item.Type) + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public enum DetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTALLED_PACKAGE(6), + AVAILABLE_PACKAGE(7), + DETAILS_NOT_SET(0); + private final int value; + + private DetailsCase(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 DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 6: + return INSTALLED_PACKAGE; + case 7: + return AVAILABLE_PACKAGE; + case 0: + return DETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+     * Identifier for this item, unique across items for this VM.
+     * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Identifier for this item, unique across items for this VM.
+     * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORIGIN_TYPE_FIELD_NUMBER = 2; + private int originType_; + /** + * + * + *
+     * The origin of this inventory item.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return The enum numeric value on the wire for originType. + */ + @java.lang.Override + public int getOriginTypeValue() { + return originType_; + } + /** + * + * + *
+     * The origin of this inventory item.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return The originType. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType getOriginType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType result = + com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType.valueOf(originType_); + return result == null + ? com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * When this inventory item was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * When this inventory item was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * When this inventory item was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * When this inventory item was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * When this inventory item was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * When this inventory item was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_; + /** + * + * + *
+     * The specific type of inventory, correlating to its specific details.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The specific type of inventory, correlating to its specific details.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.Inventory.Item.Type result = + com.google.cloud.osconfig.v1alpha.Inventory.Item.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1alpha.Inventory.Item.Type.UNRECOGNIZED + : result; + } + + public static final int INSTALLED_PACKAGE_FIELD_NUMBER = 6; + /** + * + * + *
+     * Software package present on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + * @return Whether the installedPackage field is set. + */ + @java.lang.Override + public boolean hasInstalledPackage() { + return detailsCase_ == 6; + } + /** + * + * + *
+     * Software package present on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + * @return The installedPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getInstalledPackage() { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + /** + * + * + *
+     * Software package present on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder + getInstalledPackageOrBuilder() { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + + public static final int AVAILABLE_PACKAGE_FIELD_NUMBER = 7; + /** + * + * + *
+     * Software package available to be installed on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + * @return Whether the availablePackage field is set. + */ + @java.lang.Override + public boolean hasAvailablePackage() { + return detailsCase_ == 7; + } + /** + * + * + *
+     * Software package available to be installed on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + * @return The availablePackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getAvailablePackage() { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + /** + * + * + *
+     * Software package available to be installed on the VM instance.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder + getAvailablePackageOrBuilder() { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (originType_ + != com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType.ORIGIN_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, originType_); + } + if (type_ + != com.google.cloud.osconfig.v1alpha.Inventory.Item.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (detailsCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_); + } + if (detailsCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_); + } + if (createTime_ != null) { + output.writeMessage(8, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(9, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (originType_ + != com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType.ORIGIN_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, originType_); + } + if (type_ + != com.google.cloud.osconfig.v1alpha.Inventory.Item.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); + } + if (detailsCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_); + } + if (detailsCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + 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.v1alpha.Inventory.Item)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.Item other = + (com.google.cloud.osconfig.v1alpha.Inventory.Item) obj; + + if (!getId().equals(other.getId())) return false; + if (originType_ != other.originType_) 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 (type_ != other.type_) return false; + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 6: + if (!getInstalledPackage().equals(other.getInstalledPackage())) return false; + break; + case 7: + if (!getAvailablePackage().equals(other.getAvailablePackage())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + ORIGIN_TYPE_FIELD_NUMBER; + hash = (53 * hash) + originType_; + 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + switch (detailsCase_) { + case 6: + hash = (37 * hash) + INSTALLED_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getInstalledPackage().hashCode(); + break; + case 7: + hash = (37 * hash) + AVAILABLE_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getAvailablePackage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item 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.v1alpha.Inventory.Item parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item 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.v1alpha.Inventory.Item parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item 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.v1alpha.Inventory.Item parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item 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.v1alpha.Inventory.Item parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item 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.v1alpha.Inventory.Item 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 single piece of inventory on a VM.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.Item} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.Item) + com.google.cloud.osconfig.v1alpha.Inventory.ItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.Item.class, + com.google.cloud.osconfig.v1alpha.Inventory.Item.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.Inventory.Item.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(); + id_ = ""; + + originType_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + type_ = 0; + + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_Item_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.Item.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item build() { + com.google.cloud.osconfig.v1alpha.Inventory.Item result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.Item result = + new com.google.cloud.osconfig.v1alpha.Inventory.Item(this); + result.id_ = id_; + result.originType_ = originType_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.type_ = type_; + if (detailsCase_ == 6) { + if (installedPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = installedPackageBuilder_.build(); + } + } + if (detailsCase_ == 7) { + if (availablePackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = availablePackageBuilder_.build(); + } + } + result.detailsCase_ = detailsCase_; + 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.v1alpha.Inventory.Item) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.Inventory.Item) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.Inventory.Item other) { + if (other == com.google.cloud.osconfig.v1alpha.Inventory.Item.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.originType_ != 0) { + setOriginTypeValue(other.getOriginTypeValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + switch (other.getDetailsCase()) { + case INSTALLED_PACKAGE: + { + mergeInstalledPackage(other.getInstalledPackage()); + break; + } + case AVAILABLE_PACKAGE: + { + mergeAvailablePackage(other.getAvailablePackage()); + break; + } + case DETAILS_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.v1alpha.Inventory.Item parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.Item) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Identifier for this item, unique across items for this VM.
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Identifier for this item, unique across items for this VM.
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Identifier for this item, unique across items for this VM.
+       * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Identifier for this item, unique across items for this VM.
+       * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Identifier for this item, unique across items for this VM.
+       * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private int originType_ = 0; + /** + * + * + *
+       * The origin of this inventory item.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return The enum numeric value on the wire for originType. + */ + @java.lang.Override + public int getOriginTypeValue() { + return originType_; + } + /** + * + * + *
+       * The origin of this inventory item.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @param value The enum numeric value on the wire for originType to set. + * @return This builder for chaining. + */ + public Builder setOriginTypeValue(int value) { + + originType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The origin of this inventory item.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return The originType. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType getOriginType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType result = + com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType.valueOf(originType_); + return result == null + ? com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The origin of this inventory item.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @param value The originType to set. + * @return This builder for chaining. + */ + public Builder setOriginType( + com.google.cloud.osconfig.v1alpha.Inventory.Item.OriginType value) { + if (value == null) { + throw new NullPointerException(); + } + + originType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The origin of this inventory item.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.OriginType origin_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearOriginType() { + + originType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + * + * @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(); + } + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + 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; + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + 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; + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+       * When this inventory item was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 8; + */ + 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_; + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + * + * @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(); + } + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + 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; + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + 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; + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+       * When this inventory item was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 9; + */ + 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 type_ = 0; + /** + * + * + *
+       * The specific type of inventory, correlating to its specific details.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * The specific type of inventory, correlating to its specific details.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @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; + } + /** + * + * + *
+       * The specific type of inventory, correlating to its specific details.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.Inventory.Item.Type result = + com.google.cloud.osconfig.v1alpha.Inventory.Item.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1alpha.Inventory.Item.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The specific type of inventory, correlating to its specific details.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.osconfig.v1alpha.Inventory.Item.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The specific type of inventory, correlating to its specific details.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.Item.Type type = 5; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder> + installedPackageBuilder_; + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + * + * @return Whether the installedPackage field is set. + */ + @java.lang.Override + public boolean hasInstalledPackage() { + return detailsCase_ == 6; + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + * + * @return The installedPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getInstalledPackage() { + if (installedPackageBuilder_ == null) { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } else { + if (detailsCase_ == 6) { + return installedPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + public Builder setInstalledPackage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage value) { + if (installedPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + installedPackageBuilder_.setMessage(value); + } + detailsCase_ = 6; + return this; + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + public Builder setInstalledPackage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder builderForValue) { + if (installedPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + installedPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 6; + return this; + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + public Builder mergeInstalledPackage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage value) { + if (installedPackageBuilder_ == null) { + if (detailsCase_ == 6 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 6) { + installedPackageBuilder_.mergeFrom(value); + } + installedPackageBuilder_.setMessage(value); + } + detailsCase_ = 6; + return this; + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + public Builder clearInstalledPackage() { + if (installedPackageBuilder_ == null) { + if (detailsCase_ == 6) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 6) { + detailsCase_ = 0; + details_ = null; + } + installedPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder + getInstalledPackageBuilder() { + return getInstalledPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder + getInstalledPackageOrBuilder() { + if ((detailsCase_ == 6) && (installedPackageBuilder_ != null)) { + return installedPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Software package present on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage installed_package = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder> + getInstalledPackageFieldBuilder() { + if (installedPackageBuilder_ == null) { + if (!(detailsCase_ == 6)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + installedPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 6; + onChanged(); + ; + return installedPackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder> + availablePackageBuilder_; + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + * + * @return Whether the availablePackage field is set. + */ + @java.lang.Override + public boolean hasAvailablePackage() { + return detailsCase_ == 7; + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + * + * @return The availablePackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getAvailablePackage() { + if (availablePackageBuilder_ == null) { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } else { + if (detailsCase_ == 7) { + return availablePackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + public Builder setAvailablePackage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage value) { + if (availablePackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + availablePackageBuilder_.setMessage(value); + } + detailsCase_ = 7; + return this; + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + public Builder setAvailablePackage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder builderForValue) { + if (availablePackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + availablePackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 7; + return this; + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + public Builder mergeAvailablePackage( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage value) { + if (availablePackageBuilder_ == null) { + if (detailsCase_ == 7 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 7) { + availablePackageBuilder_.mergeFrom(value); + } + availablePackageBuilder_.setMessage(value); + } + detailsCase_ = 7; + return this; + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + public Builder clearAvailablePackage() { + if (availablePackageBuilder_ == null) { + if (detailsCase_ == 7) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 7) { + detailsCase_ = 0; + details_ = null; + } + availablePackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder + getAvailablePackageBuilder() { + return getAvailablePackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder + getAvailablePackageOrBuilder() { + if ((detailsCase_ == 7) && (availablePackageBuilder_ != null)) { + return availablePackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Software package available to be installed on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage available_package = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder> + getAvailablePackageFieldBuilder() { + if (availablePackageBuilder_ == null) { + if (!(detailsCase_ == 7)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + availablePackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 7; + onChanged(); + ; + return availablePackageBuilder_; + } + + @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.v1alpha.Inventory.Item) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.Item) + private static final com.google.cloud.osconfig.v1alpha.Inventory.Item DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory.Item(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.Item getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Item parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Item(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.v1alpha.Inventory.Item getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SoftwarePackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Yum package info.
+     * For details about the yum package manager, see
+     * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + * + * @return Whether the yumPackage field is set. + */ + boolean hasYumPackage(); + /** + * + * + *
+     * Yum package info.
+     * For details about the yum package manager, see
+     * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + * + * @return The yumPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getYumPackage(); + /** + * + * + *
+     * Yum package info.
+     * For details about the yum package manager, see
+     * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder getYumPackageOrBuilder(); + + /** + * + * + *
+     * Details of an APT package.
+     * For details about the apt package manager, see
+     * https://wiki.debian.org/Apt.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + * + * @return Whether the aptPackage field is set. + */ + boolean hasAptPackage(); + /** + * + * + *
+     * Details of an APT package.
+     * For details about the apt package manager, see
+     * https://wiki.debian.org/Apt.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + * + * @return The aptPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getAptPackage(); + /** + * + * + *
+     * Details of an APT package.
+     * For details about the apt package manager, see
+     * https://wiki.debian.org/Apt.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder getAptPackageOrBuilder(); + + /** + * + * + *
+     * Details of a Zypper package.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + * + * @return Whether the zypperPackage field is set. + */ + boolean hasZypperPackage(); + /** + * + * + *
+     * Details of a Zypper package.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + * + * @return The zypperPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getZypperPackage(); + /** + * + * + *
+     * Details of a Zypper package.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getZypperPackageOrBuilder(); + + /** + * + * + *
+     * Details of a Googet package.
+     *  For details about the googet package manager, see
+     *  https://github.com/google/googet.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + * + * @return Whether the googetPackage field is set. + */ + boolean hasGoogetPackage(); + /** + * + * + *
+     * Details of a Googet package.
+     *  For details about the googet package manager, see
+     *  https://github.com/google/googet.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + * + * @return The googetPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getGoogetPackage(); + /** + * + * + *
+     * Details of a Googet package.
+     *  For details about the googet package manager, see
+     *  https://github.com/google/googet.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getGoogetPackageOrBuilder(); + + /** + * + * + *
+     * Details of a Zypper patch.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + * + * @return Whether the zypperPatch field is set. + */ + boolean hasZypperPatch(); + /** + * + * + *
+     * Details of a Zypper patch.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + * + * @return The zypperPatch. + */ + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch getZypperPatch(); + /** + * + * + *
+     * Details of a Zypper patch.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder getZypperPatchOrBuilder(); + + /** + * + * + *
+     * Details of a Windows Update package.
+     * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+     * information about Windows Update.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + * + * @return Whether the wuaPackage field is set. + */ + boolean hasWuaPackage(); + /** + * + * + *
+     * Details of a Windows Update package.
+     * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+     * information about Windows Update.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + * + * @return The wuaPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage getWuaPackage(); + /** + * + * + *
+     * Details of a Windows Update package.
+     * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+     * information about Windows Update.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder + getWuaPackageOrBuilder(); + + /** + * + * + *
+     * Details of a Windows Quick Fix engineering package.
+     * See
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * for info in Windows Quick Fix Engineering.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + * + * @return Whether the qfePackage field is set. + */ + boolean hasQfePackage(); + /** + * + * + *
+     * Details of a Windows Quick Fix engineering package.
+     * See
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * for info in Windows Quick Fix Engineering.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + * + * @return The qfePackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage getQfePackage(); + /** + * + * + *
+     * Details of a Windows Quick Fix engineering package.
+     * See
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * for info in Windows Quick Fix Engineering.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackageOrBuilder + getQfePackageOrBuilder(); + + /** + * + * + *
+     * Details of a COS package.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + * + * @return Whether the cosPackage field is set. + */ + boolean hasCosPackage(); + /** + * + * + *
+     * Details of a COS package.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + * + * @return The cosPackage. + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getCosPackage(); + /** + * + * + *
+     * Details of a COS package.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder getCosPackageOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.DetailsCase getDetailsCase(); + } + /** + * + * + *
+   * Software package information of the operating system.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} + */ + public static final class SoftwarePackage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + SoftwarePackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use SoftwarePackage.newBuilder() to construct. + private SoftwarePackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SoftwarePackage() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SoftwarePackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SoftwarePackage( + 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.v1alpha.Inventory.VersionedPackage.Builder subBuilder = + null; + if (detailsCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 1; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder subBuilder = + null; + if (detailsCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder subBuilder = + null; + if (detailsCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder subBuilder = + null; + if (detailsCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 4; + break; + } + case 42: + { + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder subBuilder = null; + if (detailsCase_ == 5) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 5; + break; + } + case 50: + { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder + subBuilder = null; + if (detailsCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .Builder + subBuilder = null; + if (detailsCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackage) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackage) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 7; + break; + } + case 66: + { + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder subBuilder = + null; + if (detailsCase_ == 8) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 8; + 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder.class); + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public enum DetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + YUM_PACKAGE(1), + APT_PACKAGE(2), + ZYPPER_PACKAGE(3), + GOOGET_PACKAGE(4), + ZYPPER_PATCH(5), + WUA_PACKAGE(6), + QFE_PACKAGE(7), + COS_PACKAGE(8), + DETAILS_NOT_SET(0); + private final int value; + + private DetailsCase(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 DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 1: + return YUM_PACKAGE; + case 2: + return APT_PACKAGE; + case 3: + return ZYPPER_PACKAGE; + case 4: + return GOOGET_PACKAGE; + case 5: + return ZYPPER_PATCH; + case 6: + return WUA_PACKAGE; + case 7: + return QFE_PACKAGE; + case 8: + return COS_PACKAGE; + case 0: + return DETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public static final int YUM_PACKAGE_FIELD_NUMBER = 1; + /** + * + * + *
+     * Yum package info.
+     * For details about the yum package manager, see
+     * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + * + * @return Whether the yumPackage field is set. + */ + @java.lang.Override + public boolean hasYumPackage() { + return detailsCase_ == 1; + } + /** + * + * + *
+     * Yum package info.
+     * For details about the yum package manager, see
+     * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + * + * @return The yumPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getYumPackage() { + if (detailsCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + /** + * + * + *
+     * Yum package info.
+     * For details about the yum package manager, see
+     * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getYumPackageOrBuilder() { + if (detailsCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + + public static final int APT_PACKAGE_FIELD_NUMBER = 2; + /** + * + * + *
+     * Details of an APT package.
+     * For details about the apt package manager, see
+     * https://wiki.debian.org/Apt.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + * + * @return Whether the aptPackage field is set. + */ + @java.lang.Override + public boolean hasAptPackage() { + return detailsCase_ == 2; + } + /** + * + * + *
+     * Details of an APT package.
+     * For details about the apt package manager, see
+     * https://wiki.debian.org/Apt.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + * + * @return The aptPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getAptPackage() { + if (detailsCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + /** + * + * + *
+     * Details of an APT package.
+     * For details about the apt package manager, see
+     * https://wiki.debian.org/Apt.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getAptPackageOrBuilder() { + if (detailsCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + + public static final int ZYPPER_PACKAGE_FIELD_NUMBER = 3; + /** + * + * + *
+     * Details of a Zypper package.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + * + * @return Whether the zypperPackage field is set. + */ + @java.lang.Override + public boolean hasZypperPackage() { + return detailsCase_ == 3; + } + /** + * + * + *
+     * Details of a Zypper package.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + * + * @return The zypperPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getZypperPackage() { + if (detailsCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + /** + * + * + *
+     * Details of a Zypper package.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getZypperPackageOrBuilder() { + if (detailsCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + + public static final int GOOGET_PACKAGE_FIELD_NUMBER = 4; + /** + * + * + *
+     * Details of a Googet package.
+     *  For details about the googet package manager, see
+     *  https://github.com/google/googet.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + * + * @return Whether the googetPackage field is set. + */ + @java.lang.Override + public boolean hasGoogetPackage() { + return detailsCase_ == 4; + } + /** + * + * + *
+     * Details of a Googet package.
+     *  For details about the googet package manager, see
+     *  https://github.com/google/googet.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + * + * @return The googetPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getGoogetPackage() { + if (detailsCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + /** + * + * + *
+     * Details of a Googet package.
+     *  For details about the googet package manager, see
+     *  https://github.com/google/googet.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getGoogetPackageOrBuilder() { + if (detailsCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + + public static final int ZYPPER_PATCH_FIELD_NUMBER = 5; + /** + * + * + *
+     * Details of a Zypper patch.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + * + * @return Whether the zypperPatch field is set. + */ + @java.lang.Override + public boolean hasZypperPatch() { + return detailsCase_ == 5; + } + /** + * + * + *
+     * Details of a Zypper patch.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + * + * @return The zypperPatch. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch getZypperPatch() { + if (detailsCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } + /** + * + * + *
+     * Details of a Zypper patch.
+     * For details about the Zypper package manager, see
+     * https://en.opensuse.org/SDB:Zypper_manual.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder + getZypperPatchOrBuilder() { + if (detailsCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } + + public static final int WUA_PACKAGE_FIELD_NUMBER = 6; + /** + * + * + *
+     * Details of a Windows Update package.
+     * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+     * information about Windows Update.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + * + * @return Whether the wuaPackage field is set. + */ + @java.lang.Override + public boolean hasWuaPackage() { + return detailsCase_ == 6; + } + /** + * + * + *
+     * Details of a Windows Update package.
+     * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+     * information about Windows Update.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + * + * @return The wuaPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage getWuaPackage() { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.getDefaultInstance(); + } + /** + * + * + *
+     * Details of a Windows Update package.
+     * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+     * information about Windows Update.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder + getWuaPackageOrBuilder() { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.getDefaultInstance(); + } + + public static final int QFE_PACKAGE_FIELD_NUMBER = 7; + /** + * + * + *
+     * Details of a Windows Quick Fix engineering package.
+     * See
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * for info in Windows Quick Fix Engineering.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + * + * @return Whether the qfePackage field is set. + */ + @java.lang.Override + public boolean hasQfePackage() { + return detailsCase_ == 7; + } + /** + * + * + *
+     * Details of a Windows Quick Fix engineering package.
+     * See
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * for info in Windows Quick Fix Engineering.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + * + * @return The qfePackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + getQfePackage() { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } + /** + * + * + *
+     * Details of a Windows Quick Fix engineering package.
+     * See
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * for info in Windows Quick Fix Engineering.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackageOrBuilder + getQfePackageOrBuilder() { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } + + public static final int COS_PACKAGE_FIELD_NUMBER = 8; + /** + * + * + *
+     * Details of a COS package.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + * + * @return Whether the cosPackage field is set. + */ + @java.lang.Override + public boolean hasCosPackage() { + return detailsCase_ == 8; + } + /** + * + * + *
+     * Details of a COS package.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + * + * @return The cosPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getCosPackage() { + if (detailsCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + /** + * + * + *
+     * Details of a COS package.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getCosPackageOrBuilder() { + if (detailsCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (detailsCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 5) { + output.writeMessage(5, (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_); + } + if (detailsCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_); + } + if (detailsCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_); + } + if (detailsCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (detailsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + if (detailsCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_); + } + if (detailsCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_); + } + if (detailsCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_); + } + if (detailsCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_); + } + 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.v1alpha.Inventory.SoftwarePackage)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage other = + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) obj; + + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 1: + if (!getYumPackage().equals(other.getYumPackage())) return false; + break; + case 2: + if (!getAptPackage().equals(other.getAptPackage())) return false; + break; + case 3: + if (!getZypperPackage().equals(other.getZypperPackage())) return false; + break; + case 4: + if (!getGoogetPackage().equals(other.getGoogetPackage())) return false; + break; + case 5: + if (!getZypperPatch().equals(other.getZypperPatch())) return false; + break; + case 6: + if (!getWuaPackage().equals(other.getWuaPackage())) return false; + break; + case 7: + if (!getQfePackage().equals(other.getQfePackage())) return false; + break; + case 8: + if (!getCosPackage().equals(other.getCosPackage())) 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 (detailsCase_) { + case 1: + hash = (37 * hash) + YUM_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getYumPackage().hashCode(); + break; + case 2: + hash = (37 * hash) + APT_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getAptPackage().hashCode(); + break; + case 3: + hash = (37 * hash) + ZYPPER_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getZypperPackage().hashCode(); + break; + case 4: + hash = (37 * hash) + GOOGET_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getGoogetPackage().hashCode(); + break; + case 5: + hash = (37 * hash) + ZYPPER_PATCH_FIELD_NUMBER; + hash = (53 * hash) + getZypperPatch().hashCode(); + break; + case 6: + hash = (37 * hash) + WUA_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getWuaPackage().hashCode(); + break; + case 7: + hash = (37 * hash) + QFE_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getQfePackage().hashCode(); + break; + case 8: + hash = (37 * hash) + COS_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getCosPackage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage 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.v1alpha.Inventory.SoftwarePackage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage 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.v1alpha.Inventory.SoftwarePackage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage 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.v1alpha.Inventory.SoftwarePackage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage 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.v1alpha.Inventory.SoftwarePackage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage 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.v1alpha.Inventory.SoftwarePackage 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; + } + /** + * + * + *
+     * Software package information of the operating system.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.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(); + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_SoftwarePackage_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage build() { + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage result = + new com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(this); + if (detailsCase_ == 1) { + if (yumPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = yumPackageBuilder_.build(); + } + } + if (detailsCase_ == 2) { + if (aptPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = aptPackageBuilder_.build(); + } + } + if (detailsCase_ == 3) { + if (zypperPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = zypperPackageBuilder_.build(); + } + } + if (detailsCase_ == 4) { + if (googetPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = googetPackageBuilder_.build(); + } + } + if (detailsCase_ == 5) { + if (zypperPatchBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = zypperPatchBuilder_.build(); + } + } + if (detailsCase_ == 6) { + if (wuaPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = wuaPackageBuilder_.build(); + } + } + if (detailsCase_ == 7) { + if (qfePackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = qfePackageBuilder_.build(); + } + } + if (detailsCase_ == 8) { + if (cosPackageBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = cosPackageBuilder_.build(); + } + } + result.detailsCase_ = detailsCase_; + 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.v1alpha.Inventory.SoftwarePackage) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage other) { + if (other + == com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage.getDefaultInstance()) + return this; + switch (other.getDetailsCase()) { + case YUM_PACKAGE: + { + mergeYumPackage(other.getYumPackage()); + break; + } + case APT_PACKAGE: + { + mergeAptPackage(other.getAptPackage()); + break; + } + case ZYPPER_PACKAGE: + { + mergeZypperPackage(other.getZypperPackage()); + break; + } + case GOOGET_PACKAGE: + { + mergeGoogetPackage(other.getGoogetPackage()); + break; + } + case ZYPPER_PATCH: + { + mergeZypperPatch(other.getZypperPatch()); + break; + } + case WUA_PACKAGE: + { + mergeWuaPackage(other.getWuaPackage()); + break; + } + case QFE_PACKAGE: + { + mergeQfePackage(other.getQfePackage()); + break; + } + case COS_PACKAGE: + { + mergeCosPackage(other.getCosPackage()); + break; + } + case DETAILS_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.v1alpha.Inventory.SoftwarePackage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + yumPackageBuilder_; + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + * + * @return Whether the yumPackage field is set. + */ + @java.lang.Override + public boolean hasYumPackage() { + return detailsCase_ == 1; + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + * + * @return The yumPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getYumPackage() { + if (yumPackageBuilder_ == null) { + if (detailsCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } else { + if (detailsCase_ == 1) { + return yumPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + public Builder setYumPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (yumPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + yumPackageBuilder_.setMessage(value); + } + detailsCase_ = 1; + return this; + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + public Builder setYumPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder builderForValue) { + if (yumPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + yumPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 1; + return this; + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + public Builder mergeYumPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (yumPackageBuilder_ == null) { + if (detailsCase_ == 1 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 1) { + yumPackageBuilder_.mergeFrom(value); + } + yumPackageBuilder_.setMessage(value); + } + detailsCase_ = 1; + return this; + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + public Builder clearYumPackage() { + if (yumPackageBuilder_ == null) { + if (detailsCase_ == 1) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 1) { + detailsCase_ = 0; + details_ = null; + } + yumPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder + getYumPackageBuilder() { + return getYumPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getYumPackageOrBuilder() { + if ((detailsCase_ == 1) && (yumPackageBuilder_ != null)) { + return yumPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Yum package info.
+       * For details about the yum package manager, see
+       * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage yum_package = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + getYumPackageFieldBuilder() { + if (yumPackageBuilder_ == null) { + if (!(detailsCase_ == 1)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + yumPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 1; + onChanged(); + ; + return yumPackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + aptPackageBuilder_; + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + * + * @return Whether the aptPackage field is set. + */ + @java.lang.Override + public boolean hasAptPackage() { + return detailsCase_ == 2; + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + * + * @return The aptPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getAptPackage() { + if (aptPackageBuilder_ == null) { + if (detailsCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } else { + if (detailsCase_ == 2) { + return aptPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + public Builder setAptPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (aptPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + aptPackageBuilder_.setMessage(value); + } + detailsCase_ = 2; + return this; + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + public Builder setAptPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder builderForValue) { + if (aptPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + aptPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 2; + return this; + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + public Builder mergeAptPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (aptPackageBuilder_ == null) { + if (detailsCase_ == 2 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 2) { + aptPackageBuilder_.mergeFrom(value); + } + aptPackageBuilder_.setMessage(value); + } + detailsCase_ = 2; + return this; + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + public Builder clearAptPackage() { + if (aptPackageBuilder_ == null) { + if (detailsCase_ == 2) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 2) { + detailsCase_ = 0; + details_ = null; + } + aptPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder + getAptPackageBuilder() { + return getAptPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getAptPackageOrBuilder() { + if ((detailsCase_ == 2) && (aptPackageBuilder_ != null)) { + return aptPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of an APT package.
+       * For details about the apt package manager, see
+       * https://wiki.debian.org/Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage apt_package = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + getAptPackageFieldBuilder() { + if (aptPackageBuilder_ == null) { + if (!(detailsCase_ == 2)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + aptPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 2; + onChanged(); + ; + return aptPackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + zypperPackageBuilder_; + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + * + * @return Whether the zypperPackage field is set. + */ + @java.lang.Override + public boolean hasZypperPackage() { + return detailsCase_ == 3; + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + * + * @return The zypperPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getZypperPackage() { + if (zypperPackageBuilder_ == null) { + if (detailsCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } else { + if (detailsCase_ == 3) { + return zypperPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + public Builder setZypperPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (zypperPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + zypperPackageBuilder_.setMessage(value); + } + detailsCase_ = 3; + return this; + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + public Builder setZypperPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder builderForValue) { + if (zypperPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + zypperPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 3; + return this; + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + public Builder mergeZypperPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (zypperPackageBuilder_ == null) { + if (detailsCase_ == 3 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 3) { + zypperPackageBuilder_.mergeFrom(value); + } + zypperPackageBuilder_.setMessage(value); + } + detailsCase_ = 3; + return this; + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + public Builder clearZypperPackage() { + if (zypperPackageBuilder_ == null) { + if (detailsCase_ == 3) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 3) { + detailsCase_ = 0; + details_ = null; + } + zypperPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder + getZypperPackageBuilder() { + return getZypperPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getZypperPackageOrBuilder() { + if ((detailsCase_ == 3) && (zypperPackageBuilder_ != null)) { + return zypperPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Zypper package.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage zypper_package = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + getZypperPackageFieldBuilder() { + if (zypperPackageBuilder_ == null) { + if (!(detailsCase_ == 3)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + zypperPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 3; + onChanged(); + ; + return zypperPackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + googetPackageBuilder_; + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + * + * @return Whether the googetPackage field is set. + */ + @java.lang.Override + public boolean hasGoogetPackage() { + return detailsCase_ == 4; + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + * + * @return The googetPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getGoogetPackage() { + if (googetPackageBuilder_ == null) { + if (detailsCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } else { + if (detailsCase_ == 4) { + return googetPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + public Builder setGoogetPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (googetPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + googetPackageBuilder_.setMessage(value); + } + detailsCase_ = 4; + return this; + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + public Builder setGoogetPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder builderForValue) { + if (googetPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + googetPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 4; + return this; + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + public Builder mergeGoogetPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (googetPackageBuilder_ == null) { + if (detailsCase_ == 4 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 4) { + googetPackageBuilder_.mergeFrom(value); + } + googetPackageBuilder_.setMessage(value); + } + detailsCase_ = 4; + return this; + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + public Builder clearGoogetPackage() { + if (googetPackageBuilder_ == null) { + if (detailsCase_ == 4) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 4) { + detailsCase_ = 0; + details_ = null; + } + googetPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder + getGoogetPackageBuilder() { + return getGoogetPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getGoogetPackageOrBuilder() { + if ((detailsCase_ == 4) && (googetPackageBuilder_ != null)) { + return googetPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Googet package.
+       *  For details about the googet package manager, see
+       *  https://github.com/google/googet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage googet_package = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + getGoogetPackageFieldBuilder() { + if (googetPackageBuilder_ == null) { + if (!(detailsCase_ == 4)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + googetPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 4; + onChanged(); + ; + return googetPackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder> + zypperPatchBuilder_; + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + * + * @return Whether the zypperPatch field is set. + */ + @java.lang.Override + public boolean hasZypperPatch() { + return detailsCase_ == 5; + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + * + * @return The zypperPatch. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch getZypperPatch() { + if (zypperPatchBuilder_ == null) { + if (detailsCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } else { + if (detailsCase_ == 5) { + return zypperPatchBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + public Builder setZypperPatch(com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch value) { + if (zypperPatchBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + zypperPatchBuilder_.setMessage(value); + } + detailsCase_ = 5; + return this; + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + public Builder setZypperPatch( + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder builderForValue) { + if (zypperPatchBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + zypperPatchBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 5; + return this; + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + public Builder mergeZypperPatch( + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch value) { + if (zypperPatchBuilder_ == null) { + if (detailsCase_ == 5 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 5) { + zypperPatchBuilder_.mergeFrom(value); + } + zypperPatchBuilder_.setMessage(value); + } + detailsCase_ = 5; + return this; + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + public Builder clearZypperPatch() { + if (zypperPatchBuilder_ == null) { + if (detailsCase_ == 5) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 5) { + detailsCase_ = 0; + details_ = null; + } + zypperPatchBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder + getZypperPatchBuilder() { + return getZypperPatchFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder + getZypperPatchOrBuilder() { + if ((detailsCase_ == 5) && (zypperPatchBuilder_ != null)) { + return zypperPatchBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Zypper patch.
+       * For details about the Zypper package manager, see
+       * https://en.opensuse.org/SDB:Zypper_manual.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.ZypperPatch zypper_patch = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder> + getZypperPatchFieldBuilder() { + if (zypperPatchBuilder_ == null) { + if (!(detailsCase_ == 5)) { + details_ = com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } + zypperPatchBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 5; + onChanged(); + ; + return zypperPatchBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder> + wuaPackageBuilder_; + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + * + * @return Whether the wuaPackage field is set. + */ + @java.lang.Override + public boolean hasWuaPackage() { + return detailsCase_ == 6; + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + * + * @return The wuaPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage getWuaPackage() { + if (wuaPackageBuilder_ == null) { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance(); + } else { + if (detailsCase_ == 6) { + return wuaPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + public Builder setWuaPackage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage value) { + if (wuaPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + wuaPackageBuilder_.setMessage(value); + } + detailsCase_ = 6; + return this; + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + public Builder setWuaPackage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder + builderForValue) { + if (wuaPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + wuaPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 6; + return this; + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + public Builder mergeWuaPackage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage value) { + if (wuaPackageBuilder_ == null) { + if (detailsCase_ == 6 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 6) { + wuaPackageBuilder_.mergeFrom(value); + } + wuaPackageBuilder_.setMessage(value); + } + detailsCase_ = 6; + return this; + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + public Builder clearWuaPackage() { + if (wuaPackageBuilder_ == null) { + if (detailsCase_ == 6) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 6) { + detailsCase_ = 0; + details_ = null; + } + wuaPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder + getWuaPackageBuilder() { + return getWuaPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder + getWuaPackageOrBuilder() { + if ((detailsCase_ == 6) && (wuaPackageBuilder_ != null)) { + return wuaPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Windows Update package.
+       * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
+       * information about Windows Update.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage wua_package = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder> + getWuaPackageFieldBuilder() { + if (wuaPackageBuilder_ == null) { + if (!(detailsCase_ == 6)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance(); + } + wuaPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 6; + onChanged(); + ; + return wuaPackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackageOrBuilder> + qfePackageBuilder_; + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + * + * @return Whether the qfePackage field is set. + */ + @java.lang.Override + public boolean hasQfePackage() { + return detailsCase_ == 7; + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + * + * @return The qfePackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + getQfePackage() { + if (qfePackageBuilder_ == null) { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } else { + if (detailsCase_ == 7) { + return qfePackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + public Builder setQfePackage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage value) { + if (qfePackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + qfePackageBuilder_.setMessage(value); + } + detailsCase_ = 7; + return this; + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + public Builder setQfePackage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.Builder + builderForValue) { + if (qfePackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + qfePackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 7; + return this; + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + public Builder mergeQfePackage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage value) { + if (qfePackageBuilder_ == null) { + if (detailsCase_ == 7 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackage) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 7) { + qfePackageBuilder_.mergeFrom(value); + } + qfePackageBuilder_.setMessage(value); + } + detailsCase_ = 7; + return this; + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + public Builder clearQfePackage() { + if (qfePackageBuilder_ == null) { + if (detailsCase_ == 7) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 7) { + detailsCase_ = 0; + details_ = null; + } + qfePackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.Builder + getQfePackageBuilder() { + return getQfePackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackageOrBuilder + getQfePackageOrBuilder() { + if ((detailsCase_ == 7) && (qfePackageBuilder_ != null)) { + return qfePackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a Windows Quick Fix engineering package.
+       * See
+       * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+       * for info in Windows Quick Fix Engineering.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackageOrBuilder> + getQfePackageFieldBuilder() { + if (qfePackageBuilder_ == null) { + if (!(detailsCase_ == 7)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } + qfePackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .Builder, + com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 7; + onChanged(); + ; + return qfePackageBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + cosPackageBuilder_; + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + * + * @return Whether the cosPackage field is set. + */ + @java.lang.Override + public boolean hasCosPackage() { + return detailsCase_ == 8; + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + * + * @return The cosPackage. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage getCosPackage() { + if (cosPackageBuilder_ == null) { + if (detailsCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } else { + if (detailsCase_ == 8) { + return cosPackageBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + public Builder setCosPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (cosPackageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + cosPackageBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + public Builder setCosPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder builderForValue) { + if (cosPackageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + cosPackageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 8; + return this; + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + public Builder mergeCosPackage( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage value) { + if (cosPackageBuilder_ == null) { + if (detailsCase_ == 8 + && details_ + != com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + .getDefaultInstance()) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.newBuilder( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 8) { + cosPackageBuilder_.mergeFrom(value); + } + cosPackageBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + public Builder clearCosPackage() { + if (cosPackageBuilder_ == null) { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + } + cosPackageBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder + getCosPackageBuilder() { + return getCosPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder + getCosPackageOrBuilder() { + if ((detailsCase_ == 8) && (cosPackageBuilder_ != null)) { + return cosPackageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_; + } + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + } + /** + * + * + *
+       * Details of a COS package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.Inventory.VersionedPackage cos_package = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder> + getCosPackageFieldBuilder() { + if (cosPackageBuilder_ == null) { + if (!(detailsCase_ == 8)) { + details_ = + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + cosPackageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder>( + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 8; + onChanged(); + ; + return cosPackageBuilder_; + } + + @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.v1alpha.Inventory.SoftwarePackage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage) + private static final com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.SoftwarePackage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SoftwarePackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SoftwarePackage(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.v1alpha.Inventory.SoftwarePackage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VersionedPackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the package.
+     * 
+ * + * string package_name = 4; + * + * @return The packageName. + */ + java.lang.String getPackageName(); + /** + * + * + *
+     * The name of the package.
+     * 
+ * + * string package_name = 4; + * + * @return The bytes for packageName. + */ + com.google.protobuf.ByteString getPackageNameBytes(); + + /** + * + * + *
+     * The system architecture this package is intended for.
+     * 
+ * + * string architecture = 2; + * + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + * + * + *
+     * The system architecture this package is intended for.
+     * 
+ * + * string architecture = 2; + * + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString getArchitectureBytes(); + + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * string version = 3; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * string version = 3; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + } + /** + * + * + *
+   * Information related to the a standard versioned package.  This includes
+   * package info for APT, Yum, Zypper, and Googet package managers.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} + */ + public static final class VersionedPackage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) + VersionedPackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionedPackage.newBuilder() to construct. + private VersionedPackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VersionedPackage() { + packageName_ = ""; + architecture_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VersionedPackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VersionedPackage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + packageName_ = 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder.class); + } + + public static final int PACKAGE_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object packageName_; + /** + * + * + *
+     * The name of the package.
+     * 
+ * + * string package_name = 4; + * + * @return The packageName. + */ + @java.lang.Override + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the package.
+     * 
+ * + * string package_name = 4; + * + * @return The bytes for packageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 2; + private volatile java.lang.Object architecture_; + /** + * + * + *
+     * The system architecture this package is intended for.
+     * 
+ * + * string architecture = 2; + * + * @return The architecture. + */ + @java.lang.Override + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } + } + /** + * + * + *
+     * The system architecture this package is intended for.
+     * 
+ * + * string architecture = 2; + * + * @return The bytes for architecture. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * string version = 3; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The version of the package.
+     * 
+ * + * string version = 3; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = 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 (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, architecture_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + if (!getPackageNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, packageName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, architecture_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + if (!getPackageNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, packageName_); + } + 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.v1alpha.Inventory.VersionedPackage)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage other = + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) obj; + + if (!getPackageName().equals(other.getPackageName())) return false; + if (!getArchitecture().equals(other.getArchitecture())) return false; + if (!getVersion().equals(other.getVersion())) 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) + PACKAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPackageName().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage 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.v1alpha.Inventory.VersionedPackage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage 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.v1alpha.Inventory.VersionedPackage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage 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.v1alpha.Inventory.VersionedPackage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage 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.v1alpha.Inventory.VersionedPackage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage 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.v1alpha.Inventory.VersionedPackage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information related to the a standard versioned package.  This includes
+     * package info for APT, Yum, Zypper, and Googet package managers.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.VersionedPackage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.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(); + packageName_ = ""; + + architecture_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_VersionedPackage_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage build() { + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage result = + new com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(this); + result.packageName_ = packageName_; + result.architecture_ = architecture_; + result.version_ = version_; + 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.v1alpha.Inventory.VersionedPackage) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage other) { + if (other + == com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage.getDefaultInstance()) + return this; + if (!other.getPackageName().isEmpty()) { + packageName_ = other.packageName_; + onChanged(); + } + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + 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.v1alpha.Inventory.VersionedPackage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object packageName_ = ""; + /** + * + * + *
+       * The name of the package.
+       * 
+ * + * string package_name = 4; + * + * @return The packageName. + */ + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the package.
+       * 
+ * + * string package_name = 4; + * + * @return The bytes for packageName. + */ + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the package.
+       * 
+ * + * string package_name = 4; + * + * @param value The packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + packageName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the package.
+       * 
+ * + * string package_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearPackageName() { + + packageName_ = getDefaultInstance().getPackageName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the package.
+       * 
+ * + * string package_name = 4; + * + * @param value The bytes for packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + packageName_ = value; + onChanged(); + return this; + } + + private java.lang.Object architecture_ = ""; + /** + * + * + *
+       * The system architecture this package is intended for.
+       * 
+ * + * string architecture = 2; + * + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The system architecture this package is intended for.
+       * 
+ * + * string architecture = 2; + * + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The system architecture this package is intended for.
+       * 
+ * + * string architecture = 2; + * + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The system architecture this package is intended for.
+       * 
+ * + * string architecture = 2; + * + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + * + * + *
+       * The system architecture this package is intended for.
+       * 
+ * + * string architecture = 2; + * + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The version of the package.
+       * 
+ * + * string version = 3; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The version of the package.
+       * 
+ * + * string version = 3; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The version of the package.
+       * 
+ * + * string version = 3; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the package.
+       * 
+ * + * string version = 3; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The version of the package.
+       * 
+ * + * string version = 3; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = 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.v1alpha.Inventory.VersionedPackage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.VersionedPackage) + private static final com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.VersionedPackage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionedPackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionedPackage(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.v1alpha.Inventory.VersionedPackage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ZypperPatchOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The name of the patch.
+     * 
+ * + * string patch_name = 5; + * + * @return The patchName. + */ + java.lang.String getPatchName(); + /** + * + * + *
+     * The name of the patch.
+     * 
+ * + * string patch_name = 5; + * + * @return The bytes for patchName. + */ + com.google.protobuf.ByteString getPatchNameBytes(); + + /** + * + * + *
+     * The category of the patch.
+     * 
+ * + * string category = 2; + * + * @return The category. + */ + java.lang.String getCategory(); + /** + * + * + *
+     * The category of the patch.
+     * 
+ * + * string category = 2; + * + * @return The bytes for category. + */ + com.google.protobuf.ByteString getCategoryBytes(); + + /** + * + * + *
+     * The severity specified for this patch
+     * 
+ * + * string severity = 3; + * + * @return The severity. + */ + java.lang.String getSeverity(); + /** + * + * + *
+     * The severity specified for this patch
+     * 
+ * + * string severity = 3; + * + * @return The bytes for severity. + */ + com.google.protobuf.ByteString getSeverityBytes(); + + /** + * + * + *
+     * Any summary information provided about this patch.
+     * 
+ * + * string summary = 4; + * + * @return The summary. + */ + java.lang.String getSummary(); + /** + * + * + *
+     * Any summary information provided about this patch.
+     * 
+ * + * string summary = 4; + * + * @return The bytes for summary. + */ + com.google.protobuf.ByteString getSummaryBytes(); + } + /** + * + * + *
+   * Details related to a Zypper Patch.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} + */ + public static final class ZypperPatch extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) + ZypperPatchOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZypperPatch.newBuilder() to construct. + private ZypperPatch(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZypperPatch() { + patchName_ = ""; + category_ = ""; + severity_ = ""; + summary_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZypperPatch(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ZypperPatch( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + category_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + severity_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + summary_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + patchName_ = 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.class, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder.class); + } + + public static final int PATCH_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object patchName_; + /** + * + * + *
+     * The name of the patch.
+     * 
+ * + * string patch_name = 5; + * + * @return The patchName. + */ + @java.lang.Override + public java.lang.String getPatchName() { + java.lang.Object ref = patchName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + patchName_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the patch.
+     * 
+ * + * string patch_name = 5; + * + * @return The bytes for patchName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPatchNameBytes() { + java.lang.Object ref = patchName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + patchName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORY_FIELD_NUMBER = 2; + private volatile java.lang.Object category_; + /** + * + * + *
+     * The category of the patch.
+     * 
+ * + * string category = 2; + * + * @return The category. + */ + @java.lang.Override + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } + } + /** + * + * + *
+     * The category of the patch.
+     * 
+ * + * string category = 2; + * + * @return The bytes for category. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + private volatile java.lang.Object severity_; + /** + * + * + *
+     * The severity specified for this patch
+     * 
+ * + * string severity = 3; + * + * @return The severity. + */ + @java.lang.Override + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } + } + /** + * + * + *
+     * The severity specified for this patch
+     * 
+ * + * string severity = 3; + * + * @return The bytes for severity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUMMARY_FIELD_NUMBER = 4; + private volatile java.lang.Object summary_; + /** + * + * + *
+     * Any summary information provided about this patch.
+     * 
+ * + * string summary = 4; + * + * @return The summary. + */ + @java.lang.Override + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } + } + /** + * + * + *
+     * Any summary information provided about this patch.
+     * 
+ * + * string summary = 4; + * + * @return The bytes for summary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = 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 (!getCategoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, category_); + } + if (!getSeverityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severity_); + } + if (!getSummaryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, summary_); + } + if (!getPatchNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, patchName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCategoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, category_); + } + if (!getSeverityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severity_); + } + if (!getSummaryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, summary_); + } + if (!getPatchNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, patchName_); + } + 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.v1alpha.Inventory.ZypperPatch)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch other = + (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) obj; + + if (!getPatchName().equals(other.getPatchName())) return false; + if (!getCategory().equals(other.getCategory())) return false; + if (!getSeverity().equals(other.getSeverity())) return false; + if (!getSummary().equals(other.getSummary())) 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) + PATCH_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPatchName().hashCode(); + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + getSeverity().hashCode(); + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch 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.v1alpha.Inventory.ZypperPatch parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch 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.v1alpha.Inventory.ZypperPatch parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch 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.v1alpha.Inventory.ZypperPatch parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch 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.v1alpha.Inventory.ZypperPatch parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch 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.v1alpha.Inventory.ZypperPatch 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; + } + /** + * + * + *
+     * Details related to a Zypper Patch.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.ZypperPatch} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatchOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.class, + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.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(); + patchName_ = ""; + + category_ = ""; + + severity_ = ""; + + summary_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_ZypperPatch_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch build() { + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch result = + new com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(this); + result.patchName_ = patchName_; + result.category_ = category_; + result.severity_ = severity_; + result.summary_ = summary_; + 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.v1alpha.Inventory.ZypperPatch) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch other) { + if (other == com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch.getDefaultInstance()) + return this; + if (!other.getPatchName().isEmpty()) { + patchName_ = other.patchName_; + onChanged(); + } + if (!other.getCategory().isEmpty()) { + category_ = other.category_; + onChanged(); + } + if (!other.getSeverity().isEmpty()) { + severity_ = other.severity_; + onChanged(); + } + if (!other.getSummary().isEmpty()) { + summary_ = other.summary_; + 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.v1alpha.Inventory.ZypperPatch parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object patchName_ = ""; + /** + * + * + *
+       * The name of the patch.
+       * 
+ * + * string patch_name = 5; + * + * @return The patchName. + */ + public java.lang.String getPatchName() { + java.lang.Object ref = patchName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + patchName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the patch.
+       * 
+ * + * string patch_name = 5; + * + * @return The bytes for patchName. + */ + public com.google.protobuf.ByteString getPatchNameBytes() { + java.lang.Object ref = patchName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + patchName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the patch.
+       * 
+ * + * string patch_name = 5; + * + * @param value The patchName to set. + * @return This builder for chaining. + */ + public Builder setPatchName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + patchName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the patch.
+       * 
+ * + * string patch_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearPatchName() { + + patchName_ = getDefaultInstance().getPatchName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the patch.
+       * 
+ * + * string patch_name = 5; + * + * @param value The bytes for patchName to set. + * @return This builder for chaining. + */ + public Builder setPatchNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + patchName_ = value; + onChanged(); + return this; + } + + private java.lang.Object category_ = ""; + /** + * + * + *
+       * The category of the patch.
+       * 
+ * + * string category = 2; + * + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The category of the patch.
+       * 
+ * + * string category = 2; + * + * @return The bytes for category. + */ + public com.google.protobuf.ByteString getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The category of the patch.
+       * 
+ * + * string category = 2; + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + category_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The category of the patch.
+       * 
+ * + * string category = 2; + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + + category_ = getDefaultInstance().getCategory(); + onChanged(); + return this; + } + /** + * + * + *
+       * The category of the patch.
+       * 
+ * + * string category = 2; + * + * @param value The bytes for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + category_ = value; + onChanged(); + return this; + } + + private java.lang.Object severity_ = ""; + /** + * + * + *
+       * The severity specified for this patch
+       * 
+ * + * string severity = 3; + * + * @return The severity. + */ + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The severity specified for this patch
+       * 
+ * + * string severity = 3; + * + * @return The bytes for severity. + */ + public com.google.protobuf.ByteString getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The severity specified for this patch
+       * 
+ * + * string severity = 3; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + severity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The severity specified for this patch
+       * 
+ * + * string severity = 3; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + + severity_ = getDefaultInstance().getSeverity(); + onChanged(); + return this; + } + /** + * + * + *
+       * The severity specified for this patch
+       * 
+ * + * string severity = 3; + * + * @param value The bytes for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + severity_ = value; + onChanged(); + return this; + } + + private java.lang.Object summary_ = ""; + /** + * + * + *
+       * Any summary information provided about this patch.
+       * 
+ * + * string summary = 4; + * + * @return The summary. + */ + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + summary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Any summary information provided about this patch.
+       * 
+ * + * string summary = 4; + * + * @return The bytes for summary. + */ + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Any summary information provided about this patch.
+       * 
+ * + * string summary = 4; + * + * @param value The summary to set. + * @return This builder for chaining. + */ + public Builder setSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + summary_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Any summary information provided about this patch.
+       * 
+ * + * string summary = 4; + * + * @return This builder for chaining. + */ + public Builder clearSummary() { + + summary_ = getDefaultInstance().getSummary(); + onChanged(); + return this; + } + /** + * + * + *
+       * Any summary information provided about this patch.
+       * 
+ * + * string summary = 4; + * + * @param value The bytes for summary to set. + * @return This builder for chaining. + */ + public Builder setSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + summary_ = 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.v1alpha.Inventory.ZypperPatch) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.ZypperPatch) + private static final com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.ZypperPatch getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZypperPatch parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ZypperPatch(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.v1alpha.Inventory.ZypperPatch getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WindowsUpdatePackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The localized title of the update package.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+     * The localized title of the update package.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+     * The localized description of the update package.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * The localized description of the update package.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + java.util.List< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory> + getCategoriesList(); + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + getCategories(int index); + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + int getCategoriesCount(); + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder> + getCategoriesOrBuilderList(); + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategoryOrBuilder + getCategoriesOrBuilder(int index); + + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @return A list containing the kbArticleIds. + */ + java.util.List getKbArticleIdsList(); + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @return The count of kbArticleIds. + */ + int getKbArticleIdsCount(); + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + java.lang.String getKbArticleIds(int index); + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + com.google.protobuf.ByteString getKbArticleIdsBytes(int index); + + /** + * + * + *
+     * A hyperlink to the language-specific support information for the update.
+     * 
+ * + * string support_url = 11; + * + * @return The supportUrl. + */ + java.lang.String getSupportUrl(); + /** + * + * + *
+     * A hyperlink to the language-specific support information for the update.
+     * 
+ * + * string support_url = 11; + * + * @return The bytes for supportUrl. + */ + com.google.protobuf.ByteString getSupportUrlBytes(); + + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @return A list containing the moreInfoUrls. + */ + java.util.List getMoreInfoUrlsList(); + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @return The count of moreInfoUrls. + */ + int getMoreInfoUrlsCount(); + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index of the element to return. + * @return The moreInfoUrls at the given index. + */ + java.lang.String getMoreInfoUrls(int index); + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index of the value to return. + * @return The bytes of the moreInfoUrls at the given index. + */ + com.google.protobuf.ByteString getMoreInfoUrlsBytes(int index); + + /** + * + * + *
+     * Gets the identifier of an update package.  Stays the same across
+     * revisions.
+     * 
+ * + * string update_id = 6; + * + * @return The updateId. + */ + java.lang.String getUpdateId(); + /** + * + * + *
+     * Gets the identifier of an update package.  Stays the same across
+     * revisions.
+     * 
+ * + * string update_id = 6; + * + * @return The bytes for updateId. + */ + com.google.protobuf.ByteString getUpdateIdBytes(); + + /** + * + * + *
+     * The revision number of this update package.
+     * 
+ * + * int32 revision_number = 7; + * + * @return The revisionNumber. + */ + int getRevisionNumber(); + + /** + * + * + *
+     * The last published date of the update, in (UTC) date and time.
+     * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + * + * @return Whether the lastDeploymentChangeTime field is set. + */ + boolean hasLastDeploymentChangeTime(); + /** + * + * + *
+     * The last published date of the update, in (UTC) date and time.
+     * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + * + * @return The lastDeploymentChangeTime. + */ + com.google.protobuf.Timestamp getLastDeploymentChangeTime(); + /** + * + * + *
+     * The last published date of the update, in (UTC) date and time.
+     * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + com.google.protobuf.TimestampOrBuilder getLastDeploymentChangeTimeOrBuilder(); + } + /** + * + * + *
+   * Details related to a Windows Update package.
+   * Field data and names are taken from Windows Update API IUpdate Interface:
+   * https://docs.microsoft.com/en-us/windows/win32/api/_wua/
+   * Descriptive fields like title, and description are localized based on
+   * the locale of the VM being updated.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} + */ + public static final class WindowsUpdatePackage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + WindowsUpdatePackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsUpdatePackage.newBuilder() to construct. + private WindowsUpdatePackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WindowsUpdatePackage() { + title_ = ""; + description_ = ""; + categories_ = java.util.Collections.emptyList(); + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + supportUrl_ = ""; + moreInfoUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + updateId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WindowsUpdatePackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WindowsUpdatePackage( + 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(); + + title_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + categories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory>(); + mutable_bitField0_ |= 0x00000001; + } + categories_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + kbArticleIds_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + moreInfoUrls_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + moreInfoUrls_.add(s); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + updateId_ = s; + break; + } + case 56: + { + revisionNumber_ = input.readInt32(); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastDeploymentChangeTime_ != null) { + subBuilder = lastDeploymentChangeTime_.toBuilder(); + } + lastDeploymentChangeTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastDeploymentChangeTime_); + lastDeploymentChangeTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + supportUrl_ = 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_ = java.util.Collections.unmodifiableList(categories_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + moreInfoUrls_ = moreInfoUrls_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder.class); + } + + public interface WindowsUpdateCategoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The identifier of the windows update category.
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+       * The identifier of the windows update category.
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+       * The name of the windows update category.
+       * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+       * The name of the windows update category.
+       * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+     * Categories specified by the Windows Update.
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} + */ + public static final class WindowsUpdateCategory extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + WindowsUpdateCategoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsUpdateCategory.newBuilder() to construct. + private WindowsUpdateCategory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WindowsUpdateCategory() { + id_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WindowsUpdateCategory(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WindowsUpdateCategory( + 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(); + + id_ = s; + break; + } + case 18: + { + 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.class, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+       * The identifier of the windows update category.
+       * 
+ * + * string id = 1; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+       * The identifier of the windows update category.
+       * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+       * The name of the windows update category.
+       * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+       * The name of the windows update category.
+       * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + other = + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory) + obj; + + if (!getId().equals(other.getId())) return false; + 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + 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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + 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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + 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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + 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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + 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.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + 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; + } + /** + * + * + *
+       * Categories specified by the Windows Update.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.class, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory.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(); + id_ = ""; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_WindowsUpdateCategory_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + build() { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + result = + new com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory(this); + result.id_ = id_; + 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.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + other) { + if (other + == com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + 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.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+         * The identifier of the windows update category.
+         * 
+ * + * string id = 1; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The identifier of the windows update category.
+         * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The identifier of the windows update category.
+         * 
+ * + * string id = 1; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The identifier of the windows update category.
+         * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+         * The identifier of the windows update category.
+         * 
+ * + * string id = 1; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+         * The name of the windows update category.
+         * 
+ * + * string name = 2; + * + * @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 name of the windows update category.
+         * 
+ * + * string name = 2; + * + * @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 name of the windows update category.
+         * 
+ * + * string name = 2; + * + * @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 name of the windows update category.
+         * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the windows update category.
+         * 
+ * + * string name = 2; + * + * @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.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory) + private static final com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsUpdateCategory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WindowsUpdateCategory(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.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TITLE_FIELD_NUMBER = 1; + private volatile java.lang.Object title_; + /** + * + * + *
+     * The localized title of the update package.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * + * + *
+     * The localized title of the update package.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * The localized description of the update package.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * The localized description of the update package.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORIES_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory> + categories_; + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory> + getCategoriesList() { + return categories_; + } + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder> + getCategoriesOrBuilderList() { + return categories_; + } + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + @java.lang.Override + public int getCategoriesCount() { + return categories_.size(); + } + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + getCategories(int index) { + return categories_.get(index); + } + /** + * + * + *
+     * The categories that are associated with this update package.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder + getCategoriesOrBuilder(int index) { + return categories_.get(index); + } + + public static final int KB_ARTICLE_IDS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList kbArticleIds_; + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList getKbArticleIdsList() { + return kbArticleIds_; + } + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + * + * + *
+     * A collection of Microsoft Knowledge Base article IDs that are associated
+     * with the update package.
+     * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + + public static final int SUPPORT_URL_FIELD_NUMBER = 11; + private volatile java.lang.Object supportUrl_; + /** + * + * + *
+     * A hyperlink to the language-specific support information for the update.
+     * 
+ * + * string support_url = 11; + * + * @return The supportUrl. + */ + @java.lang.Override + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } + } + /** + * + * + *
+     * A hyperlink to the language-specific support information for the update.
+     * 
+ * + * string support_url = 11; + * + * @return The bytes for supportUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MORE_INFO_URLS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList moreInfoUrls_; + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @return A list containing the moreInfoUrls. + */ + public com.google.protobuf.ProtocolStringList getMoreInfoUrlsList() { + return moreInfoUrls_; + } + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @return The count of moreInfoUrls. + */ + public int getMoreInfoUrlsCount() { + return moreInfoUrls_.size(); + } + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index of the element to return. + * @return The moreInfoUrls at the given index. + */ + public java.lang.String getMoreInfoUrls(int index) { + return moreInfoUrls_.get(index); + } + /** + * + * + *
+     * A collection of URLs that provide more information about the update
+     * package.
+     * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index of the value to return. + * @return The bytes of the moreInfoUrls at the given index. + */ + public com.google.protobuf.ByteString getMoreInfoUrlsBytes(int index) { + return moreInfoUrls_.getByteString(index); + } + + public static final int UPDATE_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object updateId_; + /** + * + * + *
+     * Gets the identifier of an update package.  Stays the same across
+     * revisions.
+     * 
+ * + * string update_id = 6; + * + * @return The updateId. + */ + @java.lang.Override + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } + } + /** + * + * + *
+     * Gets the identifier of an update package.  Stays the same across
+     * revisions.
+     * 
+ * + * string update_id = 6; + * + * @return The bytes for updateId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_NUMBER_FIELD_NUMBER = 7; + private int revisionNumber_; + /** + * + * + *
+     * The revision number of this update package.
+     * 
+ * + * int32 revision_number = 7; + * + * @return The revisionNumber. + */ + @java.lang.Override + public int getRevisionNumber() { + return revisionNumber_; + } + + public static final int LAST_DEPLOYMENT_CHANGE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp lastDeploymentChangeTime_; + /** + * + * + *
+     * The last published date of the update, in (UTC) date and time.
+     * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + * + * @return Whether the lastDeploymentChangeTime field is set. + */ + @java.lang.Override + public boolean hasLastDeploymentChangeTime() { + return lastDeploymentChangeTime_ != null; + } + /** + * + * + *
+     * The last published date of the update, in (UTC) date and time.
+     * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + * + * @return The lastDeploymentChangeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastDeploymentChangeTime() { + return lastDeploymentChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastDeploymentChangeTime_; + } + /** + * + * + *
+     * The last published date of the update, in (UTC) date and time.
+     * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastDeploymentChangeTimeOrBuilder() { + return getLastDeploymentChangeTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + for (int i = 0; i < categories_.size(); i++) { + output.writeMessage(3, categories_.get(i)); + } + for (int i = 0; i < kbArticleIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, kbArticleIds_.getRaw(i)); + } + for (int i = 0; i < moreInfoUrls_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, moreInfoUrls_.getRaw(i)); + } + if (!getUpdateIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, updateId_); + } + if (revisionNumber_ != 0) { + output.writeInt32(7, revisionNumber_); + } + if (lastDeploymentChangeTime_ != null) { + output.writeMessage(10, getLastDeploymentChangeTime()); + } + if (!getSupportUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, supportUrl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + for (int i = 0; i < categories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, categories_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < kbArticleIds_.size(); i++) { + dataSize += computeStringSizeNoTag(kbArticleIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getKbArticleIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < moreInfoUrls_.size(); i++) { + dataSize += computeStringSizeNoTag(moreInfoUrls_.getRaw(i)); + } + size += dataSize; + size += 1 * getMoreInfoUrlsList().size(); + } + if (!getUpdateIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, updateId_); + } + if (revisionNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, revisionNumber_); + } + if (lastDeploymentChangeTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getLastDeploymentChangeTime()); + } + if (!getSupportUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, supportUrl_); + } + 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.v1alpha.Inventory.WindowsUpdatePackage)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage other = + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getCategoriesList().equals(other.getCategoriesList())) return false; + if (!getKbArticleIdsList().equals(other.getKbArticleIdsList())) return false; + if (!getSupportUrl().equals(other.getSupportUrl())) return false; + if (!getMoreInfoUrlsList().equals(other.getMoreInfoUrlsList())) return false; + if (!getUpdateId().equals(other.getUpdateId())) return false; + if (getRevisionNumber() != other.getRevisionNumber()) return false; + if (hasLastDeploymentChangeTime() != other.hasLastDeploymentChangeTime()) return false; + if (hasLastDeploymentChangeTime()) { + if (!getLastDeploymentChangeTime().equals(other.getLastDeploymentChangeTime())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getCategoriesCount() > 0) { + hash = (37 * hash) + CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getCategoriesList().hashCode(); + } + if (getKbArticleIdsCount() > 0) { + hash = (37 * hash) + KB_ARTICLE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getKbArticleIdsList().hashCode(); + } + hash = (37 * hash) + SUPPORT_URL_FIELD_NUMBER; + hash = (53 * hash) + getSupportUrl().hashCode(); + if (getMoreInfoUrlsCount() > 0) { + hash = (37 * hash) + MORE_INFO_URLS_FIELD_NUMBER; + hash = (53 * hash) + getMoreInfoUrlsList().hashCode(); + } + hash = (37 * hash) + UPDATE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUpdateId().hashCode(); + hash = (37 * hash) + REVISION_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getRevisionNumber(); + if (hasLastDeploymentChangeTime()) { + hash = (37 * hash) + LAST_DEPLOYMENT_CHANGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastDeploymentChangeTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage 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.v1alpha.Inventory.WindowsUpdatePackage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage 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.v1alpha.Inventory.WindowsUpdatePackage parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage 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.v1alpha.Inventory.WindowsUpdatePackage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + 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.v1alpha.Inventory.WindowsUpdatePackage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage 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.v1alpha.Inventory.WindowsUpdatePackage 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; + } + /** + * + * + *
+     * Details related to a Windows Update package.
+     * Field data and names are taken from Windows Update API IUpdate Interface:
+     * https://docs.microsoft.com/en-us/windows/win32/api/_wua/
+     * Descriptive fields like title, and description are localized based on
+     * the locale of the VM being updated.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCategoriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + title_ = ""; + + description_ = ""; + + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + categoriesBuilder_.clear(); + } + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + supportUrl_ = ""; + + moreInfoUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + updateId_ = ""; + + revisionNumber_ = 0; + + if (lastDeploymentChangeTimeBuilder_ == null) { + lastDeploymentChangeTime_ = null; + } else { + lastDeploymentChangeTime_ = null; + lastDeploymentChangeTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsUpdatePackage_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage build() { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage result = + new com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(this); + int from_bitField0_ = bitField0_; + result.title_ = title_; + result.description_ = description_; + if (categoriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + categories_ = java.util.Collections.unmodifiableList(categories_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.categories_ = categories_; + } else { + result.categories_ = categoriesBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = kbArticleIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.kbArticleIds_ = kbArticleIds_; + result.supportUrl_ = supportUrl_; + if (((bitField0_ & 0x00000004) != 0)) { + moreInfoUrls_ = moreInfoUrls_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.moreInfoUrls_ = moreInfoUrls_; + result.updateId_ = updateId_; + result.revisionNumber_ = revisionNumber_; + if (lastDeploymentChangeTimeBuilder_ == null) { + result.lastDeploymentChangeTime_ = lastDeploymentChangeTime_; + } else { + result.lastDeploymentChangeTime_ = lastDeploymentChangeTimeBuilder_.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.v1alpha.Inventory.WindowsUpdatePackage) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage other) { + if (other + == com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (categoriesBuilder_ == null) { + if (!other.categories_.isEmpty()) { + if (categories_.isEmpty()) { + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCategoriesIsMutable(); + categories_.addAll(other.categories_); + } + onChanged(); + } + } else { + if (!other.categories_.isEmpty()) { + if (categoriesBuilder_.isEmpty()) { + categoriesBuilder_.dispose(); + categoriesBuilder_ = null; + categories_ = other.categories_; + bitField0_ = (bitField0_ & ~0x00000001); + categoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCategoriesFieldBuilder() + : null; + } else { + categoriesBuilder_.addAllMessages(other.categories_); + } + } + } + if (!other.kbArticleIds_.isEmpty()) { + if (kbArticleIds_.isEmpty()) { + kbArticleIds_ = other.kbArticleIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureKbArticleIdsIsMutable(); + kbArticleIds_.addAll(other.kbArticleIds_); + } + onChanged(); + } + if (!other.getSupportUrl().isEmpty()) { + supportUrl_ = other.supportUrl_; + onChanged(); + } + if (!other.moreInfoUrls_.isEmpty()) { + if (moreInfoUrls_.isEmpty()) { + moreInfoUrls_ = other.moreInfoUrls_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMoreInfoUrlsIsMutable(); + moreInfoUrls_.addAll(other.moreInfoUrls_); + } + onChanged(); + } + if (!other.getUpdateId().isEmpty()) { + updateId_ = other.updateId_; + onChanged(); + } + if (other.getRevisionNumber() != 0) { + setRevisionNumber(other.getRevisionNumber()); + } + if (other.hasLastDeploymentChangeTime()) { + mergeLastDeploymentChangeTime(other.getLastDeploymentChangeTime()); + } + 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.v1alpha.Inventory.WindowsUpdatePackage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + /** + * + * + *
+       * The localized title of the update package.
+       * 
+ * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The localized title of the update package.
+       * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The localized title of the update package.
+       * 
+ * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + title_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The localized title of the update package.
+       * 
+ * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * + * + *
+       * The localized title of the update package.
+       * 
+ * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + title_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * The localized description of the update package.
+       * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The localized description of the update package.
+       * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The localized description of the update package.
+       * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The localized description of the update package.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * The localized description of the update package.
+       * 
+ * + * 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 java.util.List< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory> + categories_ = java.util.Collections.emptyList(); + + private void ensureCategoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + categories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory>(categories_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder> + categoriesBuilder_; + + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory> + getCategoriesList() { + if (categoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(categories_); + } else { + return categoriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public int getCategoriesCount() { + if (categoriesBuilder_ == null) { + return categories_.size(); + } else { + return categoriesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + getCategories(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder setCategories( + int index, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.set(index, value); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder setCategories( + int index, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder + builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.set(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder addCategories( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(value); + onChanged(); + } else { + categoriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder addCategories( + int index, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + value) { + if (categoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCategoriesIsMutable(); + categories_.add(index, value); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder addCategories( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder + builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder addCategories( + int index, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder + builderForValue) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.add(index, builderForValue.build()); + onChanged(); + } else { + categoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder addAllCategories( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory> + values) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, categories_); + onChanged(); + } else { + categoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder clearCategories() { + if (categoriesBuilder_ == null) { + categories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + categoriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public Builder removeCategories(int index) { + if (categoriesBuilder_ == null) { + ensureCategoriesIsMutable(); + categories_.remove(index); + onChanged(); + } else { + categoriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder + getCategoriesBuilder(int index) { + return getCategoriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder + getCategoriesOrBuilder(int index) { + if (categoriesBuilder_ == null) { + return categories_.get(index); + } else { + return categoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder> + getCategoriesOrBuilderList() { + if (categoriesBuilder_ != null) { + return categoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(categories_); + } + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder + addCategoriesBuilder() { + return getCategoriesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.getDefaultInstance()); + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder + addCategoriesBuilder(int index) { + return getCategoriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.getDefaultInstance()); + } + /** + * + * + *
+       * The categories that are associated with this update package.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder> + getCategoriesBuilderList() { + return getCategoriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + .Builder, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder> + getCategoriesFieldBuilder() { + if (categoriesBuilder_ == null) { + categoriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategory.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + .WindowsUpdateCategoryOrBuilder>( + categories_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + categories_ = null; + } + return categoriesBuilder_; + } + + private com.google.protobuf.LazyStringList kbArticleIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureKbArticleIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + kbArticleIds_ = new com.google.protobuf.LazyStringArrayList(kbArticleIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @return A list containing the kbArticleIds. + */ + public com.google.protobuf.ProtocolStringList getKbArticleIdsList() { + return kbArticleIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @return The count of kbArticleIds. + */ + public int getKbArticleIdsCount() { + return kbArticleIds_.size(); + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index of the element to return. + * @return The kbArticleIds at the given index. + */ + public java.lang.String getKbArticleIds(int index) { + return kbArticleIds_.get(index); + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index of the value to return. + * @return The bytes of the kbArticleIds at the given index. + */ + public com.google.protobuf.ByteString getKbArticleIdsBytes(int index) { + return kbArticleIds_.getByteString(index); + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @param index The index to set the value at. + * @param value The kbArticleIds to set. + * @return This builder for chaining. + */ + public Builder setKbArticleIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @param value The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @param values The kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addAllKbArticleIds(java.lang.Iterable values) { + ensureKbArticleIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kbArticleIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @return This builder for chaining. + */ + public Builder clearKbArticleIds() { + kbArticleIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of Microsoft Knowledge Base article IDs that are associated
+       * with the update package.
+       * 
+ * + * repeated string kb_article_ids = 4; + * + * @param value The bytes of the kbArticleIds to add. + * @return This builder for chaining. + */ + public Builder addKbArticleIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureKbArticleIdsIsMutable(); + kbArticleIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object supportUrl_ = ""; + /** + * + * + *
+       * A hyperlink to the language-specific support information for the update.
+       * 
+ * + * string support_url = 11; + * + * @return The supportUrl. + */ + public java.lang.String getSupportUrl() { + java.lang.Object ref = supportUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + supportUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A hyperlink to the language-specific support information for the update.
+       * 
+ * + * string support_url = 11; + * + * @return The bytes for supportUrl. + */ + public com.google.protobuf.ByteString getSupportUrlBytes() { + java.lang.Object ref = supportUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + supportUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A hyperlink to the language-specific support information for the update.
+       * 
+ * + * string support_url = 11; + * + * @param value The supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + supportUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A hyperlink to the language-specific support information for the update.
+       * 
+ * + * string support_url = 11; + * + * @return This builder for chaining. + */ + public Builder clearSupportUrl() { + + supportUrl_ = getDefaultInstance().getSupportUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * A hyperlink to the language-specific support information for the update.
+       * 
+ * + * string support_url = 11; + * + * @param value The bytes for supportUrl to set. + * @return This builder for chaining. + */ + public Builder setSupportUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + supportUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList moreInfoUrls_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureMoreInfoUrlsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + moreInfoUrls_ = new com.google.protobuf.LazyStringArrayList(moreInfoUrls_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @return A list containing the moreInfoUrls. + */ + public com.google.protobuf.ProtocolStringList getMoreInfoUrlsList() { + return moreInfoUrls_.getUnmodifiableView(); + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @return The count of moreInfoUrls. + */ + public int getMoreInfoUrlsCount() { + return moreInfoUrls_.size(); + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index of the element to return. + * @return The moreInfoUrls at the given index. + */ + public java.lang.String getMoreInfoUrls(int index) { + return moreInfoUrls_.get(index); + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index of the value to return. + * @return The bytes of the moreInfoUrls at the given index. + */ + public com.google.protobuf.ByteString getMoreInfoUrlsBytes(int index) { + return moreInfoUrls_.getByteString(index); + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @param index The index to set the value at. + * @param value The moreInfoUrls to set. + * @return This builder for chaining. + */ + public Builder setMoreInfoUrls(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMoreInfoUrlsIsMutable(); + moreInfoUrls_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @param value The moreInfoUrls to add. + * @return This builder for chaining. + */ + public Builder addMoreInfoUrls(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMoreInfoUrlsIsMutable(); + moreInfoUrls_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @param values The moreInfoUrls to add. + * @return This builder for chaining. + */ + public Builder addAllMoreInfoUrls(java.lang.Iterable values) { + ensureMoreInfoUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, moreInfoUrls_); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @return This builder for chaining. + */ + public Builder clearMoreInfoUrls() { + moreInfoUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * A collection of URLs that provide more information about the update
+       * package.
+       * 
+ * + * repeated string more_info_urls = 5; + * + * @param value The bytes of the moreInfoUrls to add. + * @return This builder for chaining. + */ + public Builder addMoreInfoUrlsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMoreInfoUrlsIsMutable(); + moreInfoUrls_.add(value); + onChanged(); + return this; + } + + private java.lang.Object updateId_ = ""; + /** + * + * + *
+       * Gets the identifier of an update package.  Stays the same across
+       * revisions.
+       * 
+ * + * string update_id = 6; + * + * @return The updateId. + */ + public java.lang.String getUpdateId() { + java.lang.Object ref = updateId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Gets the identifier of an update package.  Stays the same across
+       * revisions.
+       * 
+ * + * string update_id = 6; + * + * @return The bytes for updateId. + */ + public com.google.protobuf.ByteString getUpdateIdBytes() { + java.lang.Object ref = updateId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + updateId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Gets the identifier of an update package.  Stays the same across
+       * revisions.
+       * 
+ * + * string update_id = 6; + * + * @param value The updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + updateId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Gets the identifier of an update package.  Stays the same across
+       * revisions.
+       * 
+ * + * string update_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearUpdateId() { + + updateId_ = getDefaultInstance().getUpdateId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Gets the identifier of an update package.  Stays the same across
+       * revisions.
+       * 
+ * + * string update_id = 6; + * + * @param value The bytes for updateId to set. + * @return This builder for chaining. + */ + public Builder setUpdateIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + updateId_ = value; + onChanged(); + return this; + } + + private int revisionNumber_; + /** + * + * + *
+       * The revision number of this update package.
+       * 
+ * + * int32 revision_number = 7; + * + * @return The revisionNumber. + */ + @java.lang.Override + public int getRevisionNumber() { + return revisionNumber_; + } + /** + * + * + *
+       * The revision number of this update package.
+       * 
+ * + * int32 revision_number = 7; + * + * @param value The revisionNumber to set. + * @return This builder for chaining. + */ + public Builder setRevisionNumber(int value) { + + revisionNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The revision number of this update package.
+       * 
+ * + * int32 revision_number = 7; + * + * @return This builder for chaining. + */ + public Builder clearRevisionNumber() { + + revisionNumber_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastDeploymentChangeTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastDeploymentChangeTimeBuilder_; + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + * + * @return Whether the lastDeploymentChangeTime field is set. + */ + public boolean hasLastDeploymentChangeTime() { + return lastDeploymentChangeTimeBuilder_ != null || lastDeploymentChangeTime_ != null; + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + * + * @return The lastDeploymentChangeTime. + */ + public com.google.protobuf.Timestamp getLastDeploymentChangeTime() { + if (lastDeploymentChangeTimeBuilder_ == null) { + return lastDeploymentChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastDeploymentChangeTime_; + } else { + return lastDeploymentChangeTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + public Builder setLastDeploymentChangeTime(com.google.protobuf.Timestamp value) { + if (lastDeploymentChangeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastDeploymentChangeTime_ = value; + onChanged(); + } else { + lastDeploymentChangeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + public Builder setLastDeploymentChangeTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastDeploymentChangeTimeBuilder_ == null) { + lastDeploymentChangeTime_ = builderForValue.build(); + onChanged(); + } else { + lastDeploymentChangeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + public Builder mergeLastDeploymentChangeTime(com.google.protobuf.Timestamp value) { + if (lastDeploymentChangeTimeBuilder_ == null) { + if (lastDeploymentChangeTime_ != null) { + lastDeploymentChangeTime_ = + com.google.protobuf.Timestamp.newBuilder(lastDeploymentChangeTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastDeploymentChangeTime_ = value; + } + onChanged(); + } else { + lastDeploymentChangeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + public Builder clearLastDeploymentChangeTime() { + if (lastDeploymentChangeTimeBuilder_ == null) { + lastDeploymentChangeTime_ = null; + onChanged(); + } else { + lastDeploymentChangeTime_ = null; + lastDeploymentChangeTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + public com.google.protobuf.Timestamp.Builder getLastDeploymentChangeTimeBuilder() { + + onChanged(); + return getLastDeploymentChangeTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + public com.google.protobuf.TimestampOrBuilder getLastDeploymentChangeTimeOrBuilder() { + if (lastDeploymentChangeTimeBuilder_ != null) { + return lastDeploymentChangeTimeBuilder_.getMessageOrBuilder(); + } else { + return lastDeploymentChangeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastDeploymentChangeTime_; + } + } + /** + * + * + *
+       * The last published date of the update, in (UTC) date and time.
+       * 
+ * + * .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastDeploymentChangeTimeFieldBuilder() { + if (lastDeploymentChangeTimeBuilder_ == null) { + lastDeploymentChangeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastDeploymentChangeTime(), getParentForChildren(), isClean()); + lastDeploymentChangeTime_ = null; + } + return lastDeploymentChangeTimeBuilder_; + } + + @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.v1alpha.Inventory.WindowsUpdatePackage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage) + private static final com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsUpdatePackage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsUpdatePackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WindowsUpdatePackage(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.v1alpha.Inventory.WindowsUpdatePackage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WindowsQuickFixEngineeringPackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A short textual description of the QFE update.
+     * 
+ * + * string caption = 1; + * + * @return The caption. + */ + java.lang.String getCaption(); + /** + * + * + *
+     * A short textual description of the QFE update.
+     * 
+ * + * string caption = 1; + * + * @return The bytes for caption. + */ + com.google.protobuf.ByteString getCaptionBytes(); + + /** + * + * + *
+     * A textual description of the QFE update.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * A textual description of the QFE update.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Unique identifier associated with a particular QFE update.
+     * 
+ * + * string hot_fix_id = 3; + * + * @return The hotFixId. + */ + java.lang.String getHotFixId(); + /** + * + * + *
+     * Unique identifier associated with a particular QFE update.
+     * 
+ * + * string hot_fix_id = 3; + * + * @return The bytes for hotFixId. + */ + com.google.protobuf.ByteString getHotFixIdBytes(); + + /** + * + * + *
+     * Date that the QFE update was installed.  Mapped from installed_on field.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 5; + * + * @return Whether the installTime field is set. + */ + boolean hasInstallTime(); + /** + * + * + *
+     * Date that the QFE update was installed.  Mapped from installed_on field.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 5; + * + * @return The installTime. + */ + com.google.protobuf.Timestamp getInstallTime(); + /** + * + * + *
+     * Date that the QFE update was installed.  Mapped from installed_on field.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getInstallTimeOrBuilder(); + } + /** + * + * + *
+   * Information related to a Quick Fix Engineering package.
+   * Fields are taken from Windows QuickFixEngineering Interface and match
+   * the source names:
+   * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} + */ + public static final class WindowsQuickFixEngineeringPackage + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + WindowsQuickFixEngineeringPackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use WindowsQuickFixEngineeringPackage.newBuilder() to construct. + private WindowsQuickFixEngineeringPackage( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WindowsQuickFixEngineeringPackage() { + caption_ = ""; + description_ = ""; + hotFixId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WindowsQuickFixEngineeringPackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WindowsQuickFixEngineeringPackage( + 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(); + + caption_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + hotFixId_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (installTime_ != null) { + subBuilder = installTime_.toBuilder(); + } + installTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(installTime_); + installTime_ = 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.Builder + .class); + } + + public static final int CAPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object caption_; + /** + * + * + *
+     * A short textual description of the QFE update.
+     * 
+ * + * string caption = 1; + * + * @return The caption. + */ + @java.lang.Override + public java.lang.String getCaption() { + java.lang.Object ref = caption_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caption_ = s; + return s; + } + } + /** + * + * + *
+     * A short textual description of the QFE update.
+     * 
+ * + * string caption = 1; + * + * @return The bytes for caption. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCaptionBytes() { + java.lang.Object ref = caption_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caption_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * A textual description of the QFE update.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * A textual description of the QFE update.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOT_FIX_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object hotFixId_; + /** + * + * + *
+     * Unique identifier associated with a particular QFE update.
+     * 
+ * + * string hot_fix_id = 3; + * + * @return The hotFixId. + */ + @java.lang.Override + public java.lang.String getHotFixId() { + java.lang.Object ref = hotFixId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hotFixId_ = s; + return s; + } + } + /** + * + * + *
+     * Unique identifier associated with a particular QFE update.
+     * 
+ * + * string hot_fix_id = 3; + * + * @return The bytes for hotFixId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHotFixIdBytes() { + java.lang.Object ref = hotFixId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hotFixId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTALL_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp installTime_; + /** + * + * + *
+     * Date that the QFE update was installed.  Mapped from installed_on field.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 5; + * + * @return Whether the installTime field is set. + */ + @java.lang.Override + public boolean hasInstallTime() { + return installTime_ != null; + } + /** + * + * + *
+     * Date that the QFE update was installed.  Mapped from installed_on field.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 5; + * + * @return The installTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstallTime() { + return installTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : installTime_; + } + /** + * + * + *
+     * Date that the QFE update was installed.  Mapped from installed_on field.
+     * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstallTimeOrBuilder() { + return getInstallTime(); + } + + 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 (!getCaptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, caption_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getHotFixIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, hotFixId_); + } + if (installTime_ != null) { + output.writeMessage(5, getInstallTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCaptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, caption_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getHotFixIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, hotFixId_); + } + if (installTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInstallTime()); + } + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage other = + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) obj; + + if (!getCaption().equals(other.getCaption())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getHotFixId().equals(other.getHotFixId())) return false; + if (hasInstallTime() != other.hasInstallTime()) return false; + if (hasInstallTime()) { + if (!getInstallTime().equals(other.getInstallTime())) 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) + CAPTION_FIELD_NUMBER; + hash = (53 * hash) + getCaption().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + HOT_FIX_ID_FIELD_NUMBER; + hash = (53 * hash) + getHotFixId().hashCode(); + if (hasInstallTime()) { + hash = (37 * hash) + INSTALL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstallTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information related to a Quick Fix Engineering package.
+     * Fields are taken from Windows QuickFixEngineering Interface and match
+     * the source names:
+     * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.class, + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage.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(); + caption_ = ""; + + description_ = ""; + + hotFixId_ = ""; + + if (installTimeBuilder_ == null) { + installTime_ = null; + } else { + installTime_ = null; + installTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_WindowsQuickFixEngineeringPackage_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage build() { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage result = + new com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(this); + result.caption_ = caption_; + result.description_ = description_; + result.hotFixId_ = hotFixId_; + if (installTimeBuilder_ == null) { + result.installTime_ = installTime_; + } else { + result.installTime_ = installTimeBuilder_.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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage other) { + if (other + == com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + .getDefaultInstance()) return this; + if (!other.getCaption().isEmpty()) { + caption_ = other.caption_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getHotFixId().isEmpty()) { + hotFixId_ = other.hotFixId_; + onChanged(); + } + if (other.hasInstallTime()) { + mergeInstallTime(other.getInstallTime()); + } + 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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object caption_ = ""; + /** + * + * + *
+       * A short textual description of the QFE update.
+       * 
+ * + * string caption = 1; + * + * @return The caption. + */ + public java.lang.String getCaption() { + java.lang.Object ref = caption_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + caption_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A short textual description of the QFE update.
+       * 
+ * + * string caption = 1; + * + * @return The bytes for caption. + */ + public com.google.protobuf.ByteString getCaptionBytes() { + java.lang.Object ref = caption_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + caption_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A short textual description of the QFE update.
+       * 
+ * + * string caption = 1; + * + * @param value The caption to set. + * @return This builder for chaining. + */ + public Builder setCaption(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + caption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A short textual description of the QFE update.
+       * 
+ * + * string caption = 1; + * + * @return This builder for chaining. + */ + public Builder clearCaption() { + + caption_ = getDefaultInstance().getCaption(); + onChanged(); + return this; + } + /** + * + * + *
+       * A short textual description of the QFE update.
+       * 
+ * + * string caption = 1; + * + * @param value The bytes for caption to set. + * @return This builder for chaining. + */ + public Builder setCaptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + caption_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * A textual description of the QFE update.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * A textual description of the QFE update.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * A textual description of the QFE update.
+       * 
+ * + * 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; + } + /** + * + * + *
+       * A textual description of the QFE update.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * A textual description of the QFE update.
+       * 
+ * + * 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 java.lang.Object hotFixId_ = ""; + /** + * + * + *
+       * Unique identifier associated with a particular QFE update.
+       * 
+ * + * string hot_fix_id = 3; + * + * @return The hotFixId. + */ + public java.lang.String getHotFixId() { + java.lang.Object ref = hotFixId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hotFixId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Unique identifier associated with a particular QFE update.
+       * 
+ * + * string hot_fix_id = 3; + * + * @return The bytes for hotFixId. + */ + public com.google.protobuf.ByteString getHotFixIdBytes() { + java.lang.Object ref = hotFixId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hotFixId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Unique identifier associated with a particular QFE update.
+       * 
+ * + * string hot_fix_id = 3; + * + * @param value The hotFixId to set. + * @return This builder for chaining. + */ + public Builder setHotFixId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hotFixId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Unique identifier associated with a particular QFE update.
+       * 
+ * + * string hot_fix_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearHotFixId() { + + hotFixId_ = getDefaultInstance().getHotFixId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Unique identifier associated with a particular QFE update.
+       * 
+ * + * string hot_fix_id = 3; + * + * @param value The bytes for hotFixId to set. + * @return This builder for chaining. + */ + public Builder setHotFixIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hotFixId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp installTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + installTimeBuilder_; + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + * + * @return Whether the installTime field is set. + */ + public boolean hasInstallTime() { + return installTimeBuilder_ != null || installTime_ != null; + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + * + * @return The installTime. + */ + public com.google.protobuf.Timestamp getInstallTime() { + if (installTimeBuilder_ == null) { + return installTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : installTime_; + } else { + return installTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + public Builder setInstallTime(com.google.protobuf.Timestamp value) { + if (installTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + installTime_ = value; + onChanged(); + } else { + installTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + public Builder setInstallTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (installTimeBuilder_ == null) { + installTime_ = builderForValue.build(); + onChanged(); + } else { + installTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + public Builder mergeInstallTime(com.google.protobuf.Timestamp value) { + if (installTimeBuilder_ == null) { + if (installTime_ != null) { + installTime_ = + com.google.protobuf.Timestamp.newBuilder(installTime_) + .mergeFrom(value) + .buildPartial(); + } else { + installTime_ = value; + } + onChanged(); + } else { + installTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + public Builder clearInstallTime() { + if (installTimeBuilder_ == null) { + installTime_ = null; + onChanged(); + } else { + installTime_ = null; + installTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getInstallTimeBuilder() { + + onChanged(); + return getInstallTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getInstallTimeOrBuilder() { + if (installTimeBuilder_ != null) { + return installTimeBuilder_.getMessageOrBuilder(); + } else { + return installTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : installTime_; + } + } + /** + * + * + *
+       * Date that the QFE update was installed.  Mapped from installed_on field.
+       * 
+ * + * .google.protobuf.Timestamp install_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getInstallTimeFieldBuilder() { + if (installTimeBuilder_ == null) { + installTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstallTime(), getParentForChildren(), isClean()); + installTime_ = null; + } + return installTimeBuilder_; + } + + @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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage) + private static final com.google.cloud.osconfig.v1alpha.Inventory + .WindowsQuickFixEngineeringPackage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WindowsQuickFixEngineeringPackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WindowsQuickFixEngineeringPackage(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.v1alpha.Inventory.WindowsQuickFixEngineeringPackage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The `Inventory` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The `Inventory` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_INFO_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.Inventory.OsInfo osInfo_; + /** + * + * + *
+   * Output only. Base level operating system information for the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the osInfo field is set. + */ + @java.lang.Override + public boolean hasOsInfo() { + return osInfo_ != null; + } + /** + * + * + *
+   * Output only. Base level operating system information for the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The osInfo. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfo getOsInfo() { + return osInfo_ == null + ? com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.getDefaultInstance() + : osInfo_; + } + /** + * + * + *
+   * Output only. Base level operating system information for the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder getOsInfoOrBuilder() { + return getOsInfo(); + } + + public static final int ITEMS_FIELD_NUMBER = 2; + + private static final class ItemsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_ItemsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.osconfig.v1alpha.Inventory.Item.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + items_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + internalGetItems() { + if (items_ == null) { + return com.google.protobuf.MapField.emptyMapField(ItemsDefaultEntryHolder.defaultEntry); + } + return items_; + } + + public int getItemsCount() { + return internalGetItems().getMap().size(); + } + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsItems(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetItems().getMap().containsKey(key); + } + /** Use {@link #getItemsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getItems() { + return getItemsMap(); + } + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getItemsMap() { + return internalGetItems().getMap(); + } + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrDefault( + java.lang.String key, com.google.cloud.osconfig.v1alpha.Inventory.Item defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetItems().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetItems().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp of the last reported inventory for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp of the last reported inventory for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp of the last reported inventory for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + 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 (osInfo_ != null) { + output.writeMessage(1, getOsInfo()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetItems(), ItemsDefaultEntryHolder.defaultEntry, 2); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (osInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOsInfo()); + } + for (java.util.Map.Entry + entry : internalGetItems().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + items__ = + ItemsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, items__); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + 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.v1alpha.Inventory)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.Inventory other = + (com.google.cloud.osconfig.v1alpha.Inventory) obj; + + if (!getName().equals(other.getName())) return false; + if (hasOsInfo() != other.hasOsInfo()) return false; + if (hasOsInfo()) { + if (!getOsInfo().equals(other.getOsInfo())) return false; + } + if (!internalGetItems().equals(other.internalGetItems())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasOsInfo()) { + hash = (37 * hash) + OS_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOsInfo().hashCode(); + } + if (!internalGetItems().getMap().isEmpty()) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetItems().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.Inventory parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory 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.v1alpha.Inventory parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory 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.v1alpha.Inventory parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory 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.v1alpha.Inventory parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory 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.v1alpha.Inventory parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory 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.v1alpha.Inventory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * This API resource represents the available inventory data for a
+   * Compute Engine virtual machine (VM) instance at a given point in time.
+   * You can use this API resource to determine the inventory data of your VM.
+   * For more information, see [Information provided by OS inventory
+   * management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.Inventory} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.Inventory) + com.google.cloud.osconfig.v1alpha.InventoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetItems(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableItems(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.Inventory.class, + com.google.cloud.osconfig.v1alpha.Inventory.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.Inventory.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (osInfoBuilder_ == null) { + osInfo_ = null; + } else { + osInfo_ = null; + osInfoBuilder_ = null; + } + internalGetMutableItems().clear(); + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_Inventory_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.Inventory.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory build() { + com.google.cloud.osconfig.v1alpha.Inventory result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory buildPartial() { + com.google.cloud.osconfig.v1alpha.Inventory result = + new com.google.cloud.osconfig.v1alpha.Inventory(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (osInfoBuilder_ == null) { + result.osInfo_ = osInfo_; + } else { + result.osInfo_ = osInfoBuilder_.build(); + } + result.items_ = internalGetItems(); + result.items_.makeImmutable(); + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.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.v1alpha.Inventory) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.Inventory) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.Inventory other) { + if (other == com.google.cloud.osconfig.v1alpha.Inventory.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasOsInfo()) { + mergeOsInfo(other.getOsInfo()); + } + internalGetMutableItems().mergeFrom(other.internalGetItems()); + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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.v1alpha.Inventory parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.osconfig.v1alpha.Inventory) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The `Inventory` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The `Inventory` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The `Inventory` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The `Inventory` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The `Inventory` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1alpha.Inventory.OsInfo osInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder> + osInfoBuilder_; + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the osInfo field is set. + */ + public boolean hasOsInfo() { + return osInfoBuilder_ != null || osInfo_ != null; + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The osInfo. + */ + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfo getOsInfo() { + if (osInfoBuilder_ == null) { + return osInfo_ == null + ? com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.getDefaultInstance() + : osInfo_; + } else { + return osInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOsInfo(com.google.cloud.osconfig.v1alpha.Inventory.OsInfo value) { + if (osInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + osInfo_ = value; + onChanged(); + } else { + osInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOsInfo( + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder builderForValue) { + if (osInfoBuilder_ == null) { + osInfo_ = builderForValue.build(); + onChanged(); + } else { + osInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOsInfo(com.google.cloud.osconfig.v1alpha.Inventory.OsInfo value) { + if (osInfoBuilder_ == null) { + if (osInfo_ != null) { + osInfo_ = + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.newBuilder(osInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + osInfo_ = value; + } + onChanged(); + } else { + osInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOsInfo() { + if (osInfoBuilder_ == null) { + osInfo_ = null; + onChanged(); + } else { + osInfo_ = null; + osInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder getOsInfoBuilder() { + + onChanged(); + return getOsInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder getOsInfoOrBuilder() { + if (osInfoBuilder_ != null) { + return osInfoBuilder_.getMessageOrBuilder(); + } else { + return osInfo_ == null + ? com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.getDefaultInstance() + : osInfo_; + } + } + /** + * + * + *
+     * Output only. Base level operating system information for the VM.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder> + getOsInfoFieldBuilder() { + if (osInfoBuilder_ == null) { + osInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo.Builder, + com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder>( + getOsInfo(), getParentForChildren(), isClean()); + osInfo_ = null; + } + return osInfoBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + items_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + internalGetItems() { + if (items_ == null) { + return com.google.protobuf.MapField.emptyMapField(ItemsDefaultEntryHolder.defaultEntry); + } + return items_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.osconfig.v1alpha.Inventory.Item> + internalGetMutableItems() { + onChanged(); + ; + if (items_ == null) { + items_ = com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); + } + if (!items_.isMutable()) { + items_ = items_.copy(); + } + return items_; + } + + public int getItemsCount() { + return internalGetItems().getMap().size(); + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsItems(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetItems().getMap().containsKey(key); + } + /** Use {@link #getItemsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getItems() { + return getItemsMap(); + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getItemsMap() { + return internalGetItems().getMap(); + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrDefault( + java.lang.String key, com.google.cloud.osconfig.v1alpha.Inventory.Item defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetItems().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetItems().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearItems() { + internalGetMutableItems().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeItems(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableItems().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableItems() { + return internalGetMutableItems().getMutableMap(); + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putItems( + java.lang.String key, com.google.cloud.osconfig.v1alpha.Inventory.Item value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableItems().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+     * each inventory item. The identifier is unique to each distinct and
+     * addressable inventory item and will change, when there is a new package
+     * version.
+     * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllItems( + java.util.Map values) { + internalGetMutableItems().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp of the last reported inventory for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + 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_; + } + + @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.v1alpha.Inventory) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.Inventory) + private static final com.google.cloud.osconfig.v1alpha.Inventory DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.Inventory(); + } + + public static com.google.cloud.osconfig.v1alpha.Inventory getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Inventory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Inventory(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.v1alpha.Inventory getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryName.java new file mode 100644 index 00000000..72fceb48 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InventoryName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}/inventory"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InventoryName() { + project = null; + location = null; + instance = null; + } + + private InventoryName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InventoryName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InventoryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InventoryName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InventoryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + InventoryName that = ((InventoryName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}/inventory. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InventoryName inventoryName) { + project = inventoryName.project; + location = inventoryName.location; + instance = inventoryName.instance; + } + + public InventoryName build() { + return new InventoryName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java new file mode 100644 index 00000000..f2e83551 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryOrBuilder.java @@ -0,0 +1,213 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface InventoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.Inventory) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The `Inventory` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The `Inventory` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Base level operating system information for the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the osInfo field is set. + */ + boolean hasOsInfo(); + /** + * + * + *
+   * Output only. Base level operating system information for the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The osInfo. + */ + com.google.cloud.osconfig.v1alpha.Inventory.OsInfo getOsInfo(); + /** + * + * + *
+   * Output only. Base level operating system information for the VM.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.Inventory.OsInfo os_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.Inventory.OsInfoOrBuilder getOsInfoOrBuilder(); + + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getItemsCount(); + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsItems(java.lang.String key); + /** Use {@link #getItemsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getItems(); + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getItemsMap(); + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrDefault( + java.lang.String key, com.google.cloud.osconfig.v1alpha.Inventory.Item defaultValue); + /** + * + * + *
+   * Output only. Inventory items related to the VM keyed by an opaque unique identifier for
+   * each inventory item. The identifier is unique to each distinct and
+   * addressable inventory item and will change, when there is a new package
+   * version.
+   * 
+ * + * + * map<string, .google.cloud.osconfig.v1alpha.Inventory.Item> items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.Inventory.Item getItemsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Timestamp of the last reported inventory for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp of the last reported inventory for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp of the last reported inventory for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryView.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryView.java new file mode 100644 index 00000000..426868f8 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/InventoryView.java @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * The view for inventory objects.
+ * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.InventoryView} + */ +public enum InventoryView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value.
+   * The API defaults to the BASIC view.
+   * 
+ * + * INVENTORY_VIEW_UNSPECIFIED = 0; + */ + INVENTORY_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Returns the basic inventory information that includes `os_info`.
+   * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+   * Returns all fields.
+   * 
+ * + * FULL = 2; + */ + FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default value.
+   * The API defaults to the BASIC view.
+   * 
+ * + * INVENTORY_VIEW_UNSPECIFIED = 0; + */ + public static final int INVENTORY_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Returns the basic inventory information that includes `os_info`.
+   * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+   * Returns all fields.
+   * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InventoryView 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 InventoryView forNumber(int value) { + switch (value) { + case 0: + return INVENTORY_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InventoryView findValueByNumber(int number) { + return InventoryView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories.getDescriptor().getEnumTypes().get(0); + } + + private static final InventoryView[] VALUES = values(); + + public static InventoryView 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 InventoryView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.InventoryView) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java new file mode 100644 index 00000000..ea359e21 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequest.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for listing OS policies compliance data for all Compute
+ * Engine VMs in the given location.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} + */ +public final class ListInstanceOSPoliciesCompliancesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + ListInstanceOSPoliciesCompliancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstanceOSPoliciesCompliancesRequest.newBuilder() to construct. + private ListInstanceOSPoliciesCompliancesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstanceOSPoliciesCompliancesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstanceOSPoliciesCompliancesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstanceOSPoliciesCompliancesRequest( + 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.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.class, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of results to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInstanceOSPoliciesCompliances` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInstanceOSPoliciesCompliances` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest other = + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest 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 OS policies compliance data for all Compute
+   * Engine VMs in the given location.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.class, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest.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.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest build() { + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + buildPartial() { + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest result = + new com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(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.v1alpha.ListInstanceOSPoliciesCompliancesRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + .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.v1alpha.ListInstanceOSPoliciesCompliancesRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name.
+     * Format: `projects/{project}/locations/{location}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}`
+     * For `{project}`, either Compute Engine project-number or project-id can be
+     * provided.
+     * 
+ * + * + * 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 results to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results 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 results 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 to
+     * `ListInstanceOSPoliciesCompliances` 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 to
+     * `ListInstanceOSPoliciesCompliances` 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 to
+     * `ListInstanceOSPoliciesCompliances` 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 to
+     * `ListInstanceOSPoliciesCompliances` 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 to
+     * `ListInstanceOSPoliciesCompliances` 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 a
+     * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+     * 
+ * + * 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.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + private static final com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstanceOSPoliciesCompliancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstanceOSPoliciesCompliancesRequest(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.v1alpha.ListInstanceOSPoliciesCompliancesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java new file mode 100644 index 00000000..51d93519 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListInstanceOSPoliciesCompliancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}`
+   * For `{project}`, either Compute Engine project-number or project-id can be
+   * provided.
+   * 
+ * + * + * 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 results to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInstanceOSPoliciesCompliances` 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 to
+   * `ListInstanceOSPoliciesCompliances` 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 a
+   * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `InstanceOSPoliciesCompliance` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java new file mode 100644 index 00000000..360bbc96 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponse.java @@ -0,0 +1,1248 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A response message for listing OS policies compliance data for all Compute
+ * Engine VMs in the given location.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} + */ +public final class ListInstanceOSPoliciesCompliancesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + ListInstanceOSPoliciesCompliancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstanceOSPoliciesCompliancesResponse.newBuilder() to construct. + private ListInstanceOSPoliciesCompliancesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstanceOSPoliciesCompliancesResponse() { + instanceOsPoliciesCompliances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstanceOSPoliciesCompliancesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstanceOSPoliciesCompliancesResponse( + 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)) { + instanceOsPoliciesCompliances_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance>(); + mutable_bitField0_ |= 0x00000001; + } + instanceOsPoliciesCompliances_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.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)) { + instanceOsPoliciesCompliances_ = + java.util.Collections.unmodifiableList(instanceOsPoliciesCompliances_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.class, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.Builder + .class); + } + + public static final int INSTANCE_OS_POLICIES_COMPLIANCES_FIELD_NUMBER = 1; + private java.util.List + instanceOsPoliciesCompliances_; + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + @java.lang.Override + public java.util.List + getInstanceOsPoliciesCompliancesList() { + return instanceOsPoliciesCompliances_; + } + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder> + getInstanceOsPoliciesCompliancesOrBuilderList() { + return instanceOsPoliciesCompliances_; + } + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + @java.lang.Override + public int getInstanceOsPoliciesCompliancesCount() { + return instanceOsPoliciesCompliances_.size(); + } + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + getInstanceOsPoliciesCompliances(int index) { + return instanceOsPoliciesCompliances_.get(index); + } + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder + getInstanceOsPoliciesCompliancesOrBuilder(int index) { + return instanceOsPoliciesCompliances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The pagination token to retrieve the next page of instance OS policies
+   * compliance objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The pagination token to retrieve the next page of instance OS policies
+   * compliance objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instanceOsPoliciesCompliances_.size(); i++) { + output.writeMessage(1, instanceOsPoliciesCompliances_.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 < instanceOsPoliciesCompliances_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, instanceOsPoliciesCompliances_.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.v1alpha.ListInstanceOSPoliciesCompliancesResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse other = + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) obj; + + if (!getInstanceOsPoliciesCompliancesList() + .equals(other.getInstanceOsPoliciesCompliancesList())) 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 (getInstanceOsPoliciesCompliancesCount() > 0) { + hash = (37 * hash) + INSTANCE_OS_POLICIES_COMPLIANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstanceOsPoliciesCompliancesList().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.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse 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 OS policies compliance data for all Compute
+   * Engine VMs in the given location.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.class, + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstanceOsPoliciesCompliancesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceOsPoliciesCompliancesBuilder_ == null) { + instanceOsPoliciesCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instanceOsPoliciesCompliancesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceProto + .internal_static_google_cloud_osconfig_v1alpha_ListInstanceOSPoliciesCompliancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse build() { + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + buildPartial() { + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse result = + new com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(this); + int from_bitField0_ = bitField0_; + if (instanceOsPoliciesCompliancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instanceOsPoliciesCompliances_ = + java.util.Collections.unmodifiableList(instanceOsPoliciesCompliances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instanceOsPoliciesCompliances_ = instanceOsPoliciesCompliances_; + } else { + result.instanceOsPoliciesCompliances_ = instanceOsPoliciesCompliancesBuilder_.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.v1alpha.ListInstanceOSPoliciesCompliancesResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + .getDefaultInstance()) return this; + if (instanceOsPoliciesCompliancesBuilder_ == null) { + if (!other.instanceOsPoliciesCompliances_.isEmpty()) { + if (instanceOsPoliciesCompliances_.isEmpty()) { + instanceOsPoliciesCompliances_ = other.instanceOsPoliciesCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.addAll(other.instanceOsPoliciesCompliances_); + } + onChanged(); + } + } else { + if (!other.instanceOsPoliciesCompliances_.isEmpty()) { + if (instanceOsPoliciesCompliancesBuilder_.isEmpty()) { + instanceOsPoliciesCompliancesBuilder_.dispose(); + instanceOsPoliciesCompliancesBuilder_ = null; + instanceOsPoliciesCompliances_ = other.instanceOsPoliciesCompliances_; + bitField0_ = (bitField0_ & ~0x00000001); + instanceOsPoliciesCompliancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstanceOsPoliciesCompliancesFieldBuilder() + : null; + } else { + instanceOsPoliciesCompliancesBuilder_.addAllMessages( + other.instanceOsPoliciesCompliances_); + } + } + } + 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + instanceOsPoliciesCompliances_ = java.util.Collections.emptyList(); + + private void ensureInstanceOsPoliciesCompliancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instanceOsPoliciesCompliances_ = + new java.util.ArrayList( + instanceOsPoliciesCompliances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder> + instanceOsPoliciesCompliancesBuilder_; + + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public java.util.List + getInstanceOsPoliciesCompliancesList() { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instanceOsPoliciesCompliances_); + } else { + return instanceOsPoliciesCompliancesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public int getInstanceOsPoliciesCompliancesCount() { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + return instanceOsPoliciesCompliances_.size(); + } else { + return instanceOsPoliciesCompliancesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance + getInstanceOsPoliciesCompliances(int index) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + return instanceOsPoliciesCompliances_.get(index); + } else { + return instanceOsPoliciesCompliancesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder setInstanceOsPoliciesCompliances( + int index, com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance value) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.set(index, value); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder setInstanceOsPoliciesCompliances( + int index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder builderForValue) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.set(index, builderForValue.build()); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder addInstanceOsPoliciesCompliances( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance value) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.add(value); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder addInstanceOsPoliciesCompliances( + int index, com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance value) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.add(index, value); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder addInstanceOsPoliciesCompliances( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder builderForValue) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.add(builderForValue.build()); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder addInstanceOsPoliciesCompliances( + int index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder builderForValue) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.add(index, builderForValue.build()); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder addAllInstanceOsPoliciesCompliances( + java.lang.Iterable + values) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + ensureInstanceOsPoliciesCompliancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, instanceOsPoliciesCompliances_); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder clearInstanceOsPoliciesCompliances() { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + instanceOsPoliciesCompliances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public Builder removeInstanceOsPoliciesCompliances(int index) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + ensureInstanceOsPoliciesCompliancesIsMutable(); + instanceOsPoliciesCompliances_.remove(index); + onChanged(); + } else { + instanceOsPoliciesCompliancesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder + getInstanceOsPoliciesCompliancesBuilder(int index) { + return getInstanceOsPoliciesCompliancesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder + getInstanceOsPoliciesCompliancesOrBuilder(int index) { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + return instanceOsPoliciesCompliances_.get(index); + } else { + return instanceOsPoliciesCompliancesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder> + getInstanceOsPoliciesCompliancesOrBuilderList() { + if (instanceOsPoliciesCompliancesBuilder_ != null) { + return instanceOsPoliciesCompliancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instanceOsPoliciesCompliances_); + } + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder + addInstanceOsPoliciesCompliancesBuilder() { + return getInstanceOsPoliciesCompliancesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.getDefaultInstance()); + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder + addInstanceOsPoliciesCompliancesBuilder(int index) { + return getInstanceOsPoliciesCompliancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.getDefaultInstance()); + } + /** + * + * + *
+     * List of instance OS policies compliance objects.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + public java.util.List + getInstanceOsPoliciesCompliancesBuilderList() { + return getInstanceOsPoliciesCompliancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder> + getInstanceOsPoliciesCompliancesFieldBuilder() { + if (instanceOsPoliciesCompliancesBuilder_ == null) { + instanceOsPoliciesCompliancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance.Builder, + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder>( + instanceOsPoliciesCompliances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + instanceOsPoliciesCompliances_ = null; + } + return instanceOsPoliciesCompliancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The pagination token to retrieve the next page of instance OS policies
+     * compliance objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of instance OS policies
+     * compliance objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of instance OS policies
+     * compliance objects.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of instance OS policies
+     * compliance objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of instance OS policies
+     * compliance objects.
+     * 
+ * + * 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.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + private static final com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse(); + } + + public static com.google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstanceOSPoliciesCompliancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstanceOSPoliciesCompliancesResponse(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.v1alpha.ListInstanceOSPoliciesCompliancesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java new file mode 100644 index 00000000..c5a4f606 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInstanceOSPoliciesCompliancesResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/instance_os_policies_compliance.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListInstanceOSPoliciesCompliancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListInstanceOSPoliciesCompliancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + java.util.List + getInstanceOsPoliciesCompliancesList(); + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance getInstanceOsPoliciesCompliances( + int index); + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + int getInstanceOsPoliciesCompliancesCount(); + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + java.util.List + getInstanceOsPoliciesCompliancesOrBuilderList(); + /** + * + * + *
+   * List of instance OS policies compliance objects.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + * + */ + com.google.cloud.osconfig.v1alpha.InstanceOSPoliciesComplianceOrBuilder + getInstanceOsPoliciesCompliancesOrBuilder(int index); + + /** + * + * + *
+   * The pagination token to retrieve the next page of instance OS policies
+   * compliance objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The pagination token to retrieve the next page of instance OS policies
+   * compliance objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java new file mode 100644 index 00000000..8f780ab1 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequest.java @@ -0,0 +1,1309 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for listing inventory data for all VMs in the specified
+ * location.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInventoriesRequest} + */ +public final class ListInventoriesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListInventoriesRequest) + ListInventoriesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInventoriesRequest.newBuilder() to construct. + private ListInventoriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInventoriesRequest() { + parent_ = ""; + view_ = 0; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInventoriesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInventoriesRequest( + 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: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + 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.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.class, + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be
+   * provided. For `{instance}`, only hyphen or dash character is supported to
+   * list inventories across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be
+   * provided. For `{instance}`, only hyphen or dash character is supported to
+   * list inventories across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_; + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InventoryView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.InventoryView result = + com.google.cloud.osconfig.v1alpha.InventoryView.valueOf(view_); + return result == null ? com.google.cloud.osconfig.v1alpha.InventoryView.UNRECOGNIZED : result; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The maximum number of results to return.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInventories` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInventories` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `Inventory` API resource to be included in the response.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `Inventory` API resource to be included in the response.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (view_ + != com.google.cloud.osconfig.v1alpha.InventoryView.INVENTORY_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, 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 (view_ + != com.google.cloud.osconfig.v1alpha.InventoryView.INVENTORY_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, 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.v1alpha.ListInventoriesRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest other = + (com.google.cloud.osconfig.v1alpha.ListInventoriesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + 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.v1alpha.ListInventoriesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest 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.v1alpha.ListInventoriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest 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.v1alpha.ListInventoriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest 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.v1alpha.ListInventoriesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest 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.v1alpha.ListInventoriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest 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.v1alpha.ListInventoriesRequest 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 inventory data for all VMs in the specified
+   * location.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInventoriesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListInventoriesRequest) + com.google.cloud.osconfig.v1alpha.ListInventoriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.class, + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.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_ = ""; + + view_ = 0; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInventoriesRequest getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInventoriesRequest build() { + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInventoriesRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.ListInventoriesRequest result = + new com.google.cloud.osconfig.v1alpha.ListInventoriesRequest(this); + result.parent_ = parent_; + result.view_ = view_; + 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.v1alpha.ListInventoriesRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.ListInventoriesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.ListInventoriesRequest other) { + if (other == com.google.cloud.osconfig.v1alpha.ListInventoriesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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.v1alpha.ListInventoriesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListInventoriesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be
+     * provided. For `{instance}`, only hyphen or dash character is supported to
+     * list inventories across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be
+     * provided. For `{instance}`, only hyphen or dash character is supported to
+     * list inventories across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be
+     * provided. For `{instance}`, only hyphen or dash character is supported to
+     * list inventories across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be
+     * provided. For `{instance}`, only hyphen or dash character is supported to
+     * list inventories across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be
+     * provided. For `{instance}`, only hyphen or dash character is supported to
+     * list inventories across VMs.
+     * 
+ * + * + * 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 view_ = 0; + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InventoryView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.InventoryView result = + com.google.cloud.osconfig.v1alpha.InventoryView.valueOf(view_); + return result == null ? com.google.cloud.osconfig.v1alpha.InventoryView.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.osconfig.v1alpha.InventoryView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Inventory view indicating what information should be included in the
+     * inventory resource. If unspecified, the default view is BASIC.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of results to return.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results to return.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of results to return.
+     * 
+ * + * int32 page_size = 3; + * + * @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 to
+     * `ListInventories` that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @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 to
+     * `ListInventories` that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @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 to
+     * `ListInventories` that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @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 to
+     * `ListInventories` that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A pagination token returned from a previous call to
+     * `ListInventories` that indicates where this listing
+     * should continue from.
+     * 
+ * + * string page_token = 4; + * + * @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 a
+     * `Inventory` API resource to be included in the response.
+     * 
+ * + * string filter = 5; + * + * @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 a
+     * `Inventory` API resource to be included in the response.
+     * 
+ * + * string filter = 5; + * + * @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 a
+     * `Inventory` API resource to be included in the response.
+     * 
+ * + * string filter = 5; + * + * @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 a
+     * `Inventory` API resource to be included in the response.
+     * 
+ * + * string filter = 5; + * + * @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 a
+     * `Inventory` API resource to be included in the response.
+     * 
+ * + * string filter = 5; + * + * @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.v1alpha.ListInventoriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListInventoriesRequest) + private static final com.google.cloud.osconfig.v1alpha.ListInventoriesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListInventoriesRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInventoriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInventoriesRequest(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.v1alpha.ListInventoriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java new file mode 100644 index 00000000..7598372e --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesRequestOrBuilder.java @@ -0,0 +1,158 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListInventoriesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListInventoriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be
+   * provided. For `{instance}`, only hyphen or dash character is supported to
+   * list inventories across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be
+   * provided. For `{instance}`, only hyphen or dash character is supported to
+   * list inventories across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Inventory view indicating what information should be included in the
+   * inventory resource. If unspecified, the default view is BASIC.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.InventoryView view = 2; + * + * @return The view. + */ + com.google.cloud.osconfig.v1alpha.InventoryView getView(); + + /** + * + * + *
+   * The maximum number of results to return.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInventories` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListInventories` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `Inventory` API resource to be included in the response.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `Inventory` API resource to be included in the response.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponse.java new file mode 100644 index 00000000..58a6348b --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponse.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A response message for listing inventory data for all VMs in a specified
+ * location.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInventoriesResponse} + */ +public final class ListInventoriesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListInventoriesResponse) + ListInventoriesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInventoriesResponse.newBuilder() to construct. + private ListInventoriesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInventoriesResponse() { + inventories_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInventoriesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInventoriesResponse( + 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)) { + inventories_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + inventories_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.Inventory.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)) { + inventories_ = java.util.Collections.unmodifiableList(inventories_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.class, + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.Builder.class); + } + + public static final int INVENTORIES_FIELD_NUMBER = 1; + private java.util.List inventories_; + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + @java.lang.Override + public java.util.List getInventoriesList() { + return inventories_; + } + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + @java.lang.Override + public java.util.List + getInventoriesOrBuilderList() { + return inventories_; + } + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + @java.lang.Override + public int getInventoriesCount() { + return inventories_.size(); + } + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.Inventory getInventories(int index) { + return inventories_.get(index); + } + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.InventoryOrBuilder getInventoriesOrBuilder(int index) { + return inventories_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The pagination token to retrieve the next page of inventory objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The pagination token to retrieve the next page of inventory objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < inventories_.size(); i++) { + output.writeMessage(1, inventories_.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 < inventories_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, inventories_.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.v1alpha.ListInventoriesResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse other = + (com.google.cloud.osconfig.v1alpha.ListInventoriesResponse) obj; + + if (!getInventoriesList().equals(other.getInventoriesList())) 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 (getInventoriesCount() > 0) { + hash = (37 * hash) + INVENTORIES_FIELD_NUMBER; + hash = (53 * hash) + getInventoriesList().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.v1alpha.ListInventoriesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse 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.v1alpha.ListInventoriesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse 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.v1alpha.ListInventoriesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse 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.v1alpha.ListInventoriesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse 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.v1alpha.ListInventoriesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse 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.v1alpha.ListInventoriesResponse 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 inventory data for all VMs in a specified
+   * location.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListInventoriesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListInventoriesResponse) + com.google.cloud.osconfig.v1alpha.ListInventoriesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.class, + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInventoriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (inventoriesBuilder_ == null) { + inventories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + inventoriesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.Inventories + .internal_static_google_cloud_osconfig_v1alpha_ListInventoriesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInventoriesResponse getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInventoriesResponse build() { + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListInventoriesResponse buildPartial() { + com.google.cloud.osconfig.v1alpha.ListInventoriesResponse result = + new com.google.cloud.osconfig.v1alpha.ListInventoriesResponse(this); + int from_bitField0_ = bitField0_; + if (inventoriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + inventories_ = java.util.Collections.unmodifiableList(inventories_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.inventories_ = inventories_; + } else { + result.inventories_ = inventoriesBuilder_.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.v1alpha.ListInventoriesResponse) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.ListInventoriesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.ListInventoriesResponse other) { + if (other == com.google.cloud.osconfig.v1alpha.ListInventoriesResponse.getDefaultInstance()) + return this; + if (inventoriesBuilder_ == null) { + if (!other.inventories_.isEmpty()) { + if (inventories_.isEmpty()) { + inventories_ = other.inventories_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInventoriesIsMutable(); + inventories_.addAll(other.inventories_); + } + onChanged(); + } + } else { + if (!other.inventories_.isEmpty()) { + if (inventoriesBuilder_.isEmpty()) { + inventoriesBuilder_.dispose(); + inventoriesBuilder_ = null; + inventories_ = other.inventories_; + bitField0_ = (bitField0_ & ~0x00000001); + inventoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInventoriesFieldBuilder() + : null; + } else { + inventoriesBuilder_.addAllMessages(other.inventories_); + } + } + } + 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.v1alpha.ListInventoriesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListInventoriesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List inventories_ = + java.util.Collections.emptyList(); + + private void ensureInventoriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + inventories_ = + new java.util.ArrayList(inventories_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory, + com.google.cloud.osconfig.v1alpha.Inventory.Builder, + com.google.cloud.osconfig.v1alpha.InventoryOrBuilder> + inventoriesBuilder_; + + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public java.util.List getInventoriesList() { + if (inventoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(inventories_); + } else { + return inventoriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public int getInventoriesCount() { + if (inventoriesBuilder_ == null) { + return inventories_.size(); + } else { + return inventoriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public com.google.cloud.osconfig.v1alpha.Inventory getInventories(int index) { + if (inventoriesBuilder_ == null) { + return inventories_.get(index); + } else { + return inventoriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder setInventories(int index, com.google.cloud.osconfig.v1alpha.Inventory value) { + if (inventoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInventoriesIsMutable(); + inventories_.set(index, value); + onChanged(); + } else { + inventoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder setInventories( + int index, com.google.cloud.osconfig.v1alpha.Inventory.Builder builderForValue) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.set(index, builderForValue.build()); + onChanged(); + } else { + inventoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder addInventories(com.google.cloud.osconfig.v1alpha.Inventory value) { + if (inventoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInventoriesIsMutable(); + inventories_.add(value); + onChanged(); + } else { + inventoriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder addInventories(int index, com.google.cloud.osconfig.v1alpha.Inventory value) { + if (inventoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInventoriesIsMutable(); + inventories_.add(index, value); + onChanged(); + } else { + inventoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder addInventories( + com.google.cloud.osconfig.v1alpha.Inventory.Builder builderForValue) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.add(builderForValue.build()); + onChanged(); + } else { + inventoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder addInventories( + int index, com.google.cloud.osconfig.v1alpha.Inventory.Builder builderForValue) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.add(index, builderForValue.build()); + onChanged(); + } else { + inventoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder addAllInventories( + java.lang.Iterable values) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inventories_); + onChanged(); + } else { + inventoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder clearInventories() { + if (inventoriesBuilder_ == null) { + inventories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + inventoriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public Builder removeInventories(int index) { + if (inventoriesBuilder_ == null) { + ensureInventoriesIsMutable(); + inventories_.remove(index); + onChanged(); + } else { + inventoriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.Builder getInventoriesBuilder(int index) { + return getInventoriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public com.google.cloud.osconfig.v1alpha.InventoryOrBuilder getInventoriesOrBuilder(int index) { + if (inventoriesBuilder_ == null) { + return inventories_.get(index); + } else { + return inventoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public java.util.List + getInventoriesOrBuilderList() { + if (inventoriesBuilder_ != null) { + return inventoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inventories_); + } + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.Builder addInventoriesBuilder() { + return getInventoriesFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1alpha.Inventory.getDefaultInstance()); + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public com.google.cloud.osconfig.v1alpha.Inventory.Builder addInventoriesBuilder(int index) { + return getInventoriesFieldBuilder() + .addBuilder(index, com.google.cloud.osconfig.v1alpha.Inventory.getDefaultInstance()); + } + /** + * + * + *
+     * List of inventory objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + public java.util.List + getInventoriesBuilderList() { + return getInventoriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory, + com.google.cloud.osconfig.v1alpha.Inventory.Builder, + com.google.cloud.osconfig.v1alpha.InventoryOrBuilder> + getInventoriesFieldBuilder() { + if (inventoriesBuilder_ == null) { + inventoriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.Inventory, + com.google.cloud.osconfig.v1alpha.Inventory.Builder, + com.google.cloud.osconfig.v1alpha.InventoryOrBuilder>( + inventories_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + inventories_ = null; + } + return inventoriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The pagination token to retrieve the next page of inventory objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of inventory objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of inventory objects.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of inventory objects.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of inventory objects.
+     * 
+ * + * 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.v1alpha.ListInventoriesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListInventoriesResponse) + private static final com.google.cloud.osconfig.v1alpha.ListInventoriesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListInventoriesResponse(); + } + + public static com.google.cloud.osconfig.v1alpha.ListInventoriesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInventoriesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInventoriesResponse(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.v1alpha.ListInventoriesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponseOrBuilder.java new file mode 100644 index 00000000..1b440a2c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListInventoriesResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/inventory.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListInventoriesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListInventoriesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + java.util.List getInventoriesList(); + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + com.google.cloud.osconfig.v1alpha.Inventory getInventories(int index); + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + int getInventoriesCount(); + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + java.util.List + getInventoriesOrBuilderList(); + /** + * + * + *
+   * List of inventory objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.Inventory inventories = 1; + */ + com.google.cloud.osconfig.v1alpha.InventoryOrBuilder getInventoriesOrBuilder(int index); + + /** + * + * + *
+   * The pagination token to retrieve the next page of inventory objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The pagination token to retrieve the next page of inventory objects.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java new file mode 100644 index 00000000..76913393 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequest.java @@ -0,0 +1,952 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message to list revisions for a OS policy assignment
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} + */ +public final class ListOSPolicyAssignmentRevisionsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + ListOSPolicyAssignmentRevisionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOSPolicyAssignmentRevisionsRequest.newBuilder() to construct. + private ListOSPolicyAssignmentRevisionsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOSPolicyAssignmentRevisionsRequest() { + name_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOSPolicyAssignmentRevisionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOSPolicyAssignmentRevisionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the OS policy assignment to list revisions for.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the OS policy assignment to list revisions for.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of revisions to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListOSPolicyAssignmentRevisions` that indicates where this listing should
+   * continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListOSPolicyAssignmentRevisions` that indicates where this listing should
+   * continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (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 (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest other = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().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.v1alpha.ListOSPolicyAssignmentRevisionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest 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 list revisions for a OS policy assignment
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest.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_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest build() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest result = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(this); + result.name_ = name_; + 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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.v1alpha.ListOSPolicyAssignmentRevisionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the OS policy assignment to list revisions for.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to list revisions for.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to list revisions for.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to list revisions for.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the OS policy assignment to list revisions for.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of revisions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of revisions 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 revisions 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 to
+     * `ListOSPolicyAssignmentRevisions` 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 to
+     * `ListOSPolicyAssignmentRevisions` 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 to
+     * `ListOSPolicyAssignmentRevisions` 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 to
+     * `ListOSPolicyAssignmentRevisions` 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 to
+     * `ListOSPolicyAssignmentRevisions` 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; + } + + @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.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + private static final com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOSPolicyAssignmentRevisionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOSPolicyAssignmentRevisionsRequest(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.v1alpha.ListOSPolicyAssignmentRevisionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequestOrBuilder.java new file mode 100644 index 00000000..ad5f77e3 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListOSPolicyAssignmentRevisionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the OS policy assignment to list revisions for.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the OS policy assignment to list revisions for.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The maximum number of revisions to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListOSPolicyAssignmentRevisions` 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 to
+   * `ListOSPolicyAssignmentRevisions` that indicates where this listing should
+   * continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java new file mode 100644 index 00000000..ae94b7c2 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponse.java @@ -0,0 +1,1200 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A response message for listing all revisions for a OS policy assignment.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} + */ +public final class ListOSPolicyAssignmentRevisionsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + ListOSPolicyAssignmentRevisionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOSPolicyAssignmentRevisionsResponse.newBuilder() to construct. + private ListOSPolicyAssignmentRevisionsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOSPolicyAssignmentRevisionsResponse() { + osPolicyAssignments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOSPolicyAssignmentRevisionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOSPolicyAssignmentRevisionsResponse( + 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)) { + osPolicyAssignments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyAssignments_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.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)) { + osPolicyAssignments_ = java.util.Collections.unmodifiableList(osPolicyAssignments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.Builder + .class); + } + + public static final int OS_POLICY_ASSIGNMENTS_FIELD_NUMBER = 1; + private java.util.List osPolicyAssignments_; + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public java.util.List + getOsPolicyAssignmentsList() { + return osPolicyAssignments_; + } + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public java.util.List + getOsPolicyAssignmentsOrBuilderList() { + return osPolicyAssignments_; + } + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public int getOsPolicyAssignmentsCount() { + return osPolicyAssignments_.size(); + } + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignments(int index) { + return osPolicyAssignments_.get(index); + } + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentsOrBuilder(int index) { + return osPolicyAssignments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * revisions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * revisions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < osPolicyAssignments_.size(); i++) { + output.writeMessage(1, osPolicyAssignments_.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 < osPolicyAssignments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, osPolicyAssignments_.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.v1alpha.ListOSPolicyAssignmentRevisionsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse other = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) obj; + + if (!getOsPolicyAssignmentsList().equals(other.getOsPolicyAssignmentsList())) 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 (getOsPolicyAssignmentsCount() > 0) { + hash = (37 * hash) + OS_POLICY_ASSIGNMENTS_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignmentsList().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.v1alpha.ListOSPolicyAssignmentRevisionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse 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 all revisions for a OS policy assignment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyAssignmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (osPolicyAssignmentsBuilder_ == null) { + osPolicyAssignments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyAssignmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse build() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + buildPartial() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse result = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(this); + int from_bitField0_ = bitField0_; + if (osPolicyAssignmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyAssignments_ = java.util.Collections.unmodifiableList(osPolicyAssignments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyAssignments_ = osPolicyAssignments_; + } else { + result.osPolicyAssignments_ = osPolicyAssignmentsBuilder_.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.v1alpha.ListOSPolicyAssignmentRevisionsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + .getDefaultInstance()) return this; + if (osPolicyAssignmentsBuilder_ == null) { + if (!other.osPolicyAssignments_.isEmpty()) { + if (osPolicyAssignments_.isEmpty()) { + osPolicyAssignments_ = other.osPolicyAssignments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.addAll(other.osPolicyAssignments_); + } + onChanged(); + } + } else { + if (!other.osPolicyAssignments_.isEmpty()) { + if (osPolicyAssignmentsBuilder_.isEmpty()) { + osPolicyAssignmentsBuilder_.dispose(); + osPolicyAssignmentsBuilder_ = null; + osPolicyAssignments_ = other.osPolicyAssignments_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyAssignmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyAssignmentsFieldBuilder() + : null; + } else { + osPolicyAssignmentsBuilder_.addAllMessages(other.osPolicyAssignments_); + } + } + } + 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + osPolicyAssignments_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyAssignmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyAssignments_ = + new java.util.ArrayList( + osPolicyAssignments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + osPolicyAssignmentsBuilder_; + + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public java.util.List + getOsPolicyAssignmentsList() { + if (osPolicyAssignmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyAssignments_); + } else { + return osPolicyAssignmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public int getOsPolicyAssignmentsCount() { + if (osPolicyAssignmentsBuilder_ == null) { + return osPolicyAssignments_.size(); + } else { + return osPolicyAssignmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignments(int index) { + if (osPolicyAssignmentsBuilder_ == null) { + return osPolicyAssignments_.get(index); + } else { + return osPolicyAssignmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder setOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.set(index, value); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder setOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(value); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(index, value); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addAllOsPolicyAssignments( + java.lang.Iterable values) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osPolicyAssignments_); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder clearOsPolicyAssignments() { + if (osPolicyAssignmentsBuilder_ == null) { + osPolicyAssignments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder removeOsPolicyAssignments(int index) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.remove(index); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + getOsPolicyAssignmentsBuilder(int index) { + return getOsPolicyAssignmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentsOrBuilder(int index) { + if (osPolicyAssignmentsBuilder_ == null) { + return osPolicyAssignments_.get(index); + } else { + return osPolicyAssignmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public java.util.List + getOsPolicyAssignmentsOrBuilderList() { + if (osPolicyAssignmentsBuilder_ != null) { + return osPolicyAssignmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyAssignments_); + } + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + addOsPolicyAssignmentsBuilder() { + return getOsPolicyAssignmentsFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance()); + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + addOsPolicyAssignmentsBuilder(int index) { + return getOsPolicyAssignmentsFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance()); + } + /** + * + * + *
+     * The OS policy assignment revisions
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public java.util.List + getOsPolicyAssignmentsBuilderList() { + return getOsPolicyAssignmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + getOsPolicyAssignmentsFieldBuilder() { + if (osPolicyAssignmentsBuilder_ == null) { + osPolicyAssignmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder>( + osPolicyAssignments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyAssignments_ = null; + } + return osPolicyAssignmentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * revisions.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * revisions.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * revisions.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * revisions.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignment
+     * revisions.
+     * 
+ * + * 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.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + private static final com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse(); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOSPolicyAssignmentRevisionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOSPolicyAssignmentRevisionsResponse(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.v1alpha.ListOSPolicyAssignmentRevisionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponseOrBuilder.java new file mode 100644 index 00000000..718d1f58 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentRevisionsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListOSPolicyAssignmentRevisionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentRevisionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + java.util.List getOsPolicyAssignmentsList(); + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignments(int index); + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + int getOsPolicyAssignmentsCount(); + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + java.util.List + getOsPolicyAssignmentsOrBuilderList(); + /** + * + * + *
+   * The OS policy assignment revisions
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder getOsPolicyAssignmentsOrBuilder( + int index); + + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * revisions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignment
+   * revisions.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java new file mode 100644 index 00000000..90bebced --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequest.java @@ -0,0 +1,942 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message to list OS policy assignments for a parent resource
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} + */ +public final class ListOSPolicyAssignmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + ListOSPolicyAssignmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOSPolicyAssignmentsRequest.newBuilder() to construct. + private ListOSPolicyAssignmentsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOSPolicyAssignmentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOSPolicyAssignmentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOSPolicyAssignmentsRequest( + 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of assignments to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListOSPolicyAssignments` that indicates where this listing should continue
+   * from.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListOSPolicyAssignments` that indicates where this listing should continue
+   * from.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.ListOSPolicyAssignmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest other = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) 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.v1alpha.ListOSPolicyAssignmentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest 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.v1alpha.ListOSPolicyAssignmentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest 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.v1alpha.ListOSPolicyAssignmentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest 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.v1alpha.ListOSPolicyAssignmentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest 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.v1alpha.ListOSPolicyAssignmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest 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.v1alpha.ListOSPolicyAssignmentsRequest 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 list OS policy assignments for a parent resource
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest build() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest result = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(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.v1alpha.ListOSPolicyAssignmentsRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest.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.v1alpha.ListOSPolicyAssignmentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name.
+     * 
+ * + * + * 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 resource name.
+     * 
+ * + * + * 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 resource name.
+     * 
+ * + * + * 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 resource name.
+     * 
+ * + * + * 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 resource name.
+     * 
+ * + * + * 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 assignments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of assignments 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 assignments 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 to
+     * `ListOSPolicyAssignments` 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 to
+     * `ListOSPolicyAssignments` 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 to
+     * `ListOSPolicyAssignments` 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 to
+     * `ListOSPolicyAssignments` 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 to
+     * `ListOSPolicyAssignments` 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; + } + + @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.v1alpha.ListOSPolicyAssignmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + private static final com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOSPolicyAssignmentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOSPolicyAssignmentsRequest(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.v1alpha.ListOSPolicyAssignmentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequestOrBuilder.java new file mode 100644 index 00000000..7ba3f5e3 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListOSPolicyAssignmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name.
+   * 
+ * + * + * 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 assignments to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListOSPolicyAssignments` 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 to
+   * `ListOSPolicyAssignments` that indicates where this listing should continue
+   * from.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java new file mode 100644 index 00000000..2cbadede --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponse.java @@ -0,0 +1,1182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A response message for listing all assignments under given parent.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} + */ +public final class ListOSPolicyAssignmentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + ListOSPolicyAssignmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOSPolicyAssignmentsResponse.newBuilder() to construct. + private ListOSPolicyAssignmentsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOSPolicyAssignmentsResponse() { + osPolicyAssignments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOSPolicyAssignmentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOSPolicyAssignmentsResponse( + 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)) { + osPolicyAssignments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + osPolicyAssignments_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.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)) { + osPolicyAssignments_ = java.util.Collections.unmodifiableList(osPolicyAssignments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.Builder.class); + } + + public static final int OS_POLICY_ASSIGNMENTS_FIELD_NUMBER = 1; + private java.util.List osPolicyAssignments_; + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public java.util.List + getOsPolicyAssignmentsList() { + return osPolicyAssignments_; + } + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public java.util.List + getOsPolicyAssignmentsOrBuilderList() { + return osPolicyAssignments_; + } + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public int getOsPolicyAssignmentsCount() { + return osPolicyAssignments_.size(); + } + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignments(int index) { + return osPolicyAssignments_.get(index); + } + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentsOrBuilder(int index) { + return osPolicyAssignments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignments.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignments.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < osPolicyAssignments_.size(); i++) { + output.writeMessage(1, osPolicyAssignments_.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 < osPolicyAssignments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, osPolicyAssignments_.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.v1alpha.ListOSPolicyAssignmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse other = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) obj; + + if (!getOsPolicyAssignmentsList().equals(other.getOsPolicyAssignmentsList())) 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 (getOsPolicyAssignmentsCount() > 0) { + hash = (37 * hash) + OS_POLICY_ASSIGNMENTS_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignmentsList().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.v1alpha.ListOSPolicyAssignmentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse 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.v1alpha.ListOSPolicyAssignmentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse 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.v1alpha.ListOSPolicyAssignmentsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse 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.v1alpha.ListOSPolicyAssignmentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + 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.v1alpha.ListOSPolicyAssignmentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse 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.v1alpha.ListOSPolicyAssignmentsResponse 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 all assignments under given parent.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.class, + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPolicyAssignmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (osPolicyAssignmentsBuilder_ == null) { + osPolicyAssignments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPolicyAssignmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse build() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse buildPartial() { + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse result = + new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(this); + int from_bitField0_ = bitField0_; + if (osPolicyAssignmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicyAssignments_ = java.util.Collections.unmodifiableList(osPolicyAssignments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicyAssignments_ = osPolicyAssignments_; + } else { + result.osPolicyAssignments_ = osPolicyAssignmentsBuilder_.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.v1alpha.ListOSPolicyAssignmentsResponse) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse.getDefaultInstance()) + return this; + if (osPolicyAssignmentsBuilder_ == null) { + if (!other.osPolicyAssignments_.isEmpty()) { + if (osPolicyAssignments_.isEmpty()) { + osPolicyAssignments_ = other.osPolicyAssignments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.addAll(other.osPolicyAssignments_); + } + onChanged(); + } + } else { + if (!other.osPolicyAssignments_.isEmpty()) { + if (osPolicyAssignmentsBuilder_.isEmpty()) { + osPolicyAssignmentsBuilder_.dispose(); + osPolicyAssignmentsBuilder_ = null; + osPolicyAssignments_ = other.osPolicyAssignments_; + bitField0_ = (bitField0_ & ~0x00000001); + osPolicyAssignmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPolicyAssignmentsFieldBuilder() + : null; + } else { + osPolicyAssignmentsBuilder_.addAllMessages(other.osPolicyAssignments_); + } + } + } + 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.v1alpha.ListOSPolicyAssignmentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + osPolicyAssignments_ = java.util.Collections.emptyList(); + + private void ensureOsPolicyAssignmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicyAssignments_ = + new java.util.ArrayList( + osPolicyAssignments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + osPolicyAssignmentsBuilder_; + + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public java.util.List + getOsPolicyAssignmentsList() { + if (osPolicyAssignmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicyAssignments_); + } else { + return osPolicyAssignmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public int getOsPolicyAssignmentsCount() { + if (osPolicyAssignmentsBuilder_ == null) { + return osPolicyAssignments_.size(); + } else { + return osPolicyAssignmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignments(int index) { + if (osPolicyAssignmentsBuilder_ == null) { + return osPolicyAssignments_.get(index); + } else { + return osPolicyAssignmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder setOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.set(index, value); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder setOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.set(index, builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(value); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(index, value); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addOsPolicyAssignments( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.add(index, builderForValue.build()); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder addAllOsPolicyAssignments( + java.lang.Iterable values) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osPolicyAssignments_); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder clearOsPolicyAssignments() { + if (osPolicyAssignmentsBuilder_ == null) { + osPolicyAssignments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public Builder removeOsPolicyAssignments(int index) { + if (osPolicyAssignmentsBuilder_ == null) { + ensureOsPolicyAssignmentsIsMutable(); + osPolicyAssignments_.remove(index); + onChanged(); + } else { + osPolicyAssignmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + getOsPolicyAssignmentsBuilder(int index) { + return getOsPolicyAssignmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentsOrBuilder(int index) { + if (osPolicyAssignmentsBuilder_ == null) { + return osPolicyAssignments_.get(index); + } else { + return osPolicyAssignmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public java.util.List + getOsPolicyAssignmentsOrBuilderList() { + if (osPolicyAssignmentsBuilder_ != null) { + return osPolicyAssignmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicyAssignments_); + } + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + addOsPolicyAssignmentsBuilder() { + return getOsPolicyAssignmentsFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + addOsPolicyAssignmentsBuilder(int index) { + return getOsPolicyAssignmentsFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of assignments
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + public java.util.List + getOsPolicyAssignmentsBuilderList() { + return getOsPolicyAssignmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + getOsPolicyAssignmentsFieldBuilder() { + if (osPolicyAssignmentsBuilder_ == null) { + osPolicyAssignmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder>( + osPolicyAssignments_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + osPolicyAssignments_ = null; + } + return osPolicyAssignmentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignments.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignments.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of OS policy assignments.
+     * 
+ * + * 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.v1alpha.ListOSPolicyAssignmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + private static final com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse(); + } + + public static com.google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOSPolicyAssignmentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOSPolicyAssignmentsResponse(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.v1alpha.ListOSPolicyAssignmentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponseOrBuilder.java new file mode 100644 index 00000000..faf4743f --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListOSPolicyAssignmentsResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListOSPolicyAssignmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + java.util.List getOsPolicyAssignmentsList(); + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignments(int index); + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + int getOsPolicyAssignmentsCount(); + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + java.util.List + getOsPolicyAssignmentsOrBuilderList(); + /** + * + * + *
+   * The list of assignments
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignments = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder getOsPolicyAssignmentsOrBuilder( + int index); + + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignments.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The pagination token to retrieve the next page of OS policy assignments.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java new file mode 100644 index 00000000..860b693c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequest.java @@ -0,0 +1,1160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A request message for listing vulnerability reports for all VM instances in
+ * the specified location.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} + */ +public final class ListVulnerabilityReportsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + ListVulnerabilityReportsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListVulnerabilityReportsRequest.newBuilder() to construct. + private ListVulnerabilityReportsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListVulnerabilityReportsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListVulnerabilityReportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListVulnerabilityReportsRequest( + 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.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.class, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, only `-` character is supported to list vulnerability
+   * reports across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, only `-` character is supported to list vulnerability
+   * reports across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of results to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListVulnerabilityReports` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListVulnerabilityReports` that indicates where this listing
+   * should continue from.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `vulnerabilityReport` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `vulnerabilityReport` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.ListVulnerabilityReportsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest other = + (com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) 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.v1alpha.ListVulnerabilityReportsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest 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.v1alpha.ListVulnerabilityReportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest 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.v1alpha.ListVulnerabilityReportsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest 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.v1alpha.ListVulnerabilityReportsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + 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.v1alpha.ListVulnerabilityReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest 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.v1alpha.ListVulnerabilityReportsRequest 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 vulnerability reports for all VM instances in
+   * the specified location.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.class, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.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.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest build() { + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest result = + new com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(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.v1alpha.ListVulnerabilityReportsRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest.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.v1alpha.ListVulnerabilityReportsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, only `-` character is supported to list vulnerability
+     * reports across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, only `-` character is supported to list vulnerability
+     * reports across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, only `-` character is supported to list vulnerability
+     * reports across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, only `-` character is supported to list vulnerability
+     * reports across VMs.
+     * 
+ * + * + * 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 resource name.
+     * Format: `projects/{project}/locations/{location}/instances/{instance}`
+     * For `{project}`, either `project-number` or `project-id` can be provided.
+     * For `{instance}`, only `-` character is supported to list vulnerability
+     * reports across VMs.
+     * 
+ * + * + * 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 results to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of results 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 results 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 to
+     * `ListVulnerabilityReports` 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 to
+     * `ListVulnerabilityReports` 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 to
+     * `ListVulnerabilityReports` 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 to
+     * `ListVulnerabilityReports` 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 to
+     * `ListVulnerabilityReports` 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 a
+     * `vulnerabilityReport` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `vulnerabilityReport` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `vulnerabilityReport` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `vulnerabilityReport` API resource to be included in the response.
+     * 
+ * + * 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 a
+     * `vulnerabilityReport` API resource to be included in the response.
+     * 
+ * + * 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.v1alpha.ListVulnerabilityReportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + private static final com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListVulnerabilityReportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListVulnerabilityReportsRequest(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.v1alpha.ListVulnerabilityReportsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java new file mode 100644 index 00000000..b84d9c00 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListVulnerabilityReportsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, only `-` character is supported to list vulnerability
+   * reports across VMs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: `projects/{project}/locations/{location}/instances/{instance}`
+   * For `{project}`, either `project-number` or `project-id` can be provided.
+   * For `{instance}`, only `-` character is supported to list vulnerability
+   * reports across VMs.
+   * 
+ * + * + * 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 results to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A pagination token returned from a previous call to
+   * `ListVulnerabilityReports` 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 to
+   * `ListVulnerabilityReports` 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 a
+   * `vulnerabilityReport` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * If provided, this field specifies the criteria that must be met by a
+   * `vulnerabilityReport` API resource to be included in the response.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponse.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponse.java new file mode 100644 index 00000000..583d5b0f --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponse.java @@ -0,0 +1,1197 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * A response message for listing vulnerability reports for all VM instances in
+ * the specified location.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} + */ +public final class ListVulnerabilityReportsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + ListVulnerabilityReportsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListVulnerabilityReportsResponse.newBuilder() to construct. + private ListVulnerabilityReportsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListVulnerabilityReportsResponse() { + vulnerabilityReports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListVulnerabilityReportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListVulnerabilityReportsResponse( + 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)) { + vulnerabilityReports_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport>(); + mutable_bitField0_ |= 0x00000001; + } + vulnerabilityReports_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.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)) { + vulnerabilityReports_ = java.util.Collections.unmodifiableList(vulnerabilityReports_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.class, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.Builder.class); + } + + public static final int VULNERABILITY_REPORTS_FIELD_NUMBER = 1; + private java.util.List + vulnerabilityReports_; + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + @java.lang.Override + public java.util.List + getVulnerabilityReportsList() { + return vulnerabilityReports_; + } + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + @java.lang.Override + public java.util.List + getVulnerabilityReportsOrBuilderList() { + return vulnerabilityReports_; + } + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + @java.lang.Override + public int getVulnerabilityReportsCount() { + return vulnerabilityReports_.size(); + } + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport getVulnerabilityReports(int index) { + return vulnerabilityReports_.get(index); + } + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder + getVulnerabilityReportsOrBuilder(int index) { + return vulnerabilityReports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The pagination token to retrieve the next page of vulnerabilityReports
+   * object.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The pagination token to retrieve the next page of vulnerabilityReports
+   * object.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < vulnerabilityReports_.size(); i++) { + output.writeMessage(1, vulnerabilityReports_.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 < vulnerabilityReports_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, vulnerabilityReports_.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.v1alpha.ListVulnerabilityReportsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse other = + (com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) obj; + + if (!getVulnerabilityReportsList().equals(other.getVulnerabilityReportsList())) 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 (getVulnerabilityReportsCount() > 0) { + hash = (37 * hash) + VULNERABILITY_REPORTS_FIELD_NUMBER; + hash = (53 * hash) + getVulnerabilityReportsList().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.v1alpha.ListVulnerabilityReportsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse 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.v1alpha.ListVulnerabilityReportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse 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.v1alpha.ListVulnerabilityReportsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse 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.v1alpha.ListVulnerabilityReportsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + 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.v1alpha.ListVulnerabilityReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse 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.v1alpha.ListVulnerabilityReportsResponse 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 vulnerability reports for all VM instances in
+   * the specified location.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.class, + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVulnerabilityReportsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (vulnerabilityReportsBuilder_ == null) { + vulnerabilityReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + vulnerabilityReportsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse build() { + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse buildPartial() { + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse result = + new com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(this); + int from_bitField0_ = bitField0_; + if (vulnerabilityReportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vulnerabilityReports_ = java.util.Collections.unmodifiableList(vulnerabilityReports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vulnerabilityReports_ = vulnerabilityReports_; + } else { + result.vulnerabilityReports_ = vulnerabilityReportsBuilder_.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.v1alpha.ListVulnerabilityReportsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse other) { + if (other + == com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + .getDefaultInstance()) return this; + if (vulnerabilityReportsBuilder_ == null) { + if (!other.vulnerabilityReports_.isEmpty()) { + if (vulnerabilityReports_.isEmpty()) { + vulnerabilityReports_ = other.vulnerabilityReports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.addAll(other.vulnerabilityReports_); + } + onChanged(); + } + } else { + if (!other.vulnerabilityReports_.isEmpty()) { + if (vulnerabilityReportsBuilder_.isEmpty()) { + vulnerabilityReportsBuilder_.dispose(); + vulnerabilityReportsBuilder_ = null; + vulnerabilityReports_ = other.vulnerabilityReports_; + bitField0_ = (bitField0_ & ~0x00000001); + vulnerabilityReportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVulnerabilityReportsFieldBuilder() + : null; + } else { + vulnerabilityReportsBuilder_.addAllMessages(other.vulnerabilityReports_); + } + } + } + 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.v1alpha.ListVulnerabilityReportsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + vulnerabilityReports_ = java.util.Collections.emptyList(); + + private void ensureVulnerabilityReportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vulnerabilityReports_ = + new java.util.ArrayList( + vulnerabilityReports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder> + vulnerabilityReportsBuilder_; + + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public java.util.List + getVulnerabilityReportsList() { + if (vulnerabilityReportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(vulnerabilityReports_); + } else { + return vulnerabilityReportsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public int getVulnerabilityReportsCount() { + if (vulnerabilityReportsBuilder_ == null) { + return vulnerabilityReports_.size(); + } else { + return vulnerabilityReportsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport getVulnerabilityReports( + int index) { + if (vulnerabilityReportsBuilder_ == null) { + return vulnerabilityReports_.get(index); + } else { + return vulnerabilityReportsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder setVulnerabilityReports( + int index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport value) { + if (vulnerabilityReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.set(index, value); + onChanged(); + } else { + vulnerabilityReportsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder setVulnerabilityReports( + int index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder builderForValue) { + if (vulnerabilityReportsBuilder_ == null) { + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.set(index, builderForValue.build()); + onChanged(); + } else { + vulnerabilityReportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder addVulnerabilityReports( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport value) { + if (vulnerabilityReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.add(value); + onChanged(); + } else { + vulnerabilityReportsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder addVulnerabilityReports( + int index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport value) { + if (vulnerabilityReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.add(index, value); + onChanged(); + } else { + vulnerabilityReportsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder addVulnerabilityReports( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder builderForValue) { + if (vulnerabilityReportsBuilder_ == null) { + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.add(builderForValue.build()); + onChanged(); + } else { + vulnerabilityReportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder addVulnerabilityReports( + int index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder builderForValue) { + if (vulnerabilityReportsBuilder_ == null) { + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.add(index, builderForValue.build()); + onChanged(); + } else { + vulnerabilityReportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder addAllVulnerabilityReports( + java.lang.Iterable + values) { + if (vulnerabilityReportsBuilder_ == null) { + ensureVulnerabilityReportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vulnerabilityReports_); + onChanged(); + } else { + vulnerabilityReportsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder clearVulnerabilityReports() { + if (vulnerabilityReportsBuilder_ == null) { + vulnerabilityReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + vulnerabilityReportsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public Builder removeVulnerabilityReports(int index) { + if (vulnerabilityReportsBuilder_ == null) { + ensureVulnerabilityReportsIsMutable(); + vulnerabilityReports_.remove(index); + onChanged(); + } else { + vulnerabilityReportsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder + getVulnerabilityReportsBuilder(int index) { + return getVulnerabilityReportsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder + getVulnerabilityReportsOrBuilder(int index) { + if (vulnerabilityReportsBuilder_ == null) { + return vulnerabilityReports_.get(index); + } else { + return vulnerabilityReportsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public java.util.List + getVulnerabilityReportsOrBuilderList() { + if (vulnerabilityReportsBuilder_ != null) { + return vulnerabilityReportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vulnerabilityReports_); + } + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder + addVulnerabilityReportsBuilder() { + return getVulnerabilityReportsFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1alpha.VulnerabilityReport.getDefaultInstance()); + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder + addVulnerabilityReportsBuilder(int index) { + return getVulnerabilityReportsFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport.getDefaultInstance()); + } + /** + * + * + *
+     * List of vulnerabilityReport objects.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + public java.util.List + getVulnerabilityReportsBuilderList() { + return getVulnerabilityReportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder> + getVulnerabilityReportsFieldBuilder() { + if (vulnerabilityReportsBuilder_ == null) { + vulnerabilityReportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder>( + vulnerabilityReports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vulnerabilityReports_ = null; + } + return vulnerabilityReportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The pagination token to retrieve the next page of vulnerabilityReports
+     * object.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of vulnerabilityReports
+     * object.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The pagination token to retrieve the next page of vulnerabilityReports
+     * object.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of vulnerabilityReports
+     * object.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The pagination token to retrieve the next page of vulnerabilityReports
+     * object.
+     * 
+ * + * 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.v1alpha.ListVulnerabilityReportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + private static final com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse(); + } + + public static com.google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListVulnerabilityReportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListVulnerabilityReportsResponse(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.v1alpha.ListVulnerabilityReportsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponseOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponseOrBuilder.java new file mode 100644 index 00000000..b1c5f534 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/ListVulnerabilityReportsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface ListVulnerabilityReportsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.ListVulnerabilityReportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + java.util.List + getVulnerabilityReportsList(); + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport getVulnerabilityReports(int index); + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + int getVulnerabilityReportsCount(); + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + java.util.List + getVulnerabilityReportsOrBuilderList(); + /** + * + * + *
+   * List of vulnerabilityReport objects.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport vulnerability_reports = 1; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder getVulnerabilityReportsOrBuilder( + int index); + + /** + * + * + *
+   * The pagination token to retrieve the next page of vulnerabilityReports
+   * object.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The pagination token to retrieve the next page of vulnerabilityReports
+   * object.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/LocationName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/LocationName.java new file mode 100644 index 00000000..97e5dc64 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java new file mode 100644 index 00000000..4790d52f --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicy.java @@ -0,0 +1,33216 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * An OS policy defines the desired state configuration for a VM.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy} + */ +public final class OSPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy) + OSPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicy.newBuilder() to construct. + private OSPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicy() { + id_ = ""; + description_ = ""; + mode_ = 0; + resourceGroups_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicy( + 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(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + mode_ = rawValue; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resourceGroups_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup>(); + mutable_bitField0_ |= 0x00000001; + } + resourceGroups_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.parser(), + extensionRegistry)); + break; + } + case 40: + { + allowNoResourceGroupMatch_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resourceGroups_ = java.util.Collections.unmodifiableList(resourceGroups_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Builder.class); + } + + /** + * + * + *
+   * Policy mode
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicy.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid mode
+     * 
+ * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
+     * This mode checks if the configuration resources in the policy are in
+     * their desired state. No actions are performed if they are not in the
+     * desired state. This mode is used for reporting purposes.
+     * 
+ * + * VALIDATION = 1; + */ + VALIDATION(1), + /** + * + * + *
+     * This mode checks if the configuration resources in the policy are in
+     * their desired state, and if not, enforces the desired state.
+     * 
+ * + * ENFORCEMENT = 2; + */ + ENFORCEMENT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid mode
+     * 
+ * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * This mode checks if the configuration resources in the policy are in
+     * their desired state. No actions are performed if they are not in the
+     * desired state. This mode is used for reporting purposes.
+     * 
+ * + * VALIDATION = 1; + */ + public static final int VALIDATION_VALUE = 1; + /** + * + * + *
+     * This mode checks if the configuration resources in the policy are in
+     * their desired state, and if not, enforces the desired state.
+     * 
+ * + * ENFORCEMENT = 2; + */ + public static final int ENFORCEMENT_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 Mode 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 Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return VALIDATION; + case 2: + return ENFORCEMENT; + 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 Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.getDescriptor().getEnumTypes().get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode 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 Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicy.Mode) + } + + public interface OSFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * This should match OS short name emitted by the OS inventory agent.
+     * An empty value matches any OS.
+     * 
+ * + * string os_short_name = 1; + * + * @return The osShortName. + */ + java.lang.String getOsShortName(); + /** + * + * + *
+     * This should match OS short name emitted by the OS inventory agent.
+     * An empty value matches any OS.
+     * 
+ * + * string os_short_name = 1; + * + * @return The bytes for osShortName. + */ + com.google.protobuf.ByteString getOsShortNameBytes(); + + /** + * + * + *
+     * This value should match the version emitted by the OS inventory
+     * agent.
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + java.lang.String getOsVersion(); + /** + * + * + *
+     * This value should match the version emitted by the OS inventory
+     * agent.
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + com.google.protobuf.ByteString getOsVersionBytes(); + } + /** + * + * + *
+   * The `OSFilter` is used to specify the OS filtering criteria for the
+   * resource group.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} + */ + public static final class OSFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) + OSFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSFilter.newBuilder() to construct. + private OSFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSFilter() { + osShortName_ = ""; + osVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSFilter( + 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(); + + osShortName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + osVersion_ = 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder.class); + } + + public static final int OS_SHORT_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object osShortName_; + /** + * + * + *
+     * This should match OS short name emitted by the OS inventory agent.
+     * An empty value matches any OS.
+     * 
+ * + * string os_short_name = 1; + * + * @return The osShortName. + */ + @java.lang.Override + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } + } + /** + * + * + *
+     * This should match OS short name emitted by the OS inventory agent.
+     * An empty value matches any OS.
+     * 
+ * + * string os_short_name = 1; + * + * @return The bytes for osShortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object osVersion_; + /** + * + * + *
+     * This value should match the version emitted by the OS inventory
+     * agent.
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + @java.lang.Override + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } + } + /** + * + * + *
+     * This value should match the version emitted by the OS inventory
+     * agent.
+     * Prefix matches are supported if asterisk(*) is provided as the
+     * last character. For example, to match all versions with a major
+     * version of `7`, specify the following value for this field `7.*`
+     * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = 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 (!getOsShortNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osShortName_); + } + if (!getOsVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOsShortNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osShortName_); + } + if (!getOsVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, osVersion_); + } + 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.v1alpha.OSPolicy.OSFilter)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) obj; + + if (!getOsShortName().equals(other.getOsShortName())) return false; + if (!getOsVersion().equals(other.getOsVersion())) 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) + OS_SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOsShortName().hashCode(); + hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter 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.v1alpha.OSPolicy.OSFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter 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.v1alpha.OSPolicy.OSFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter 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.v1alpha.OSPolicy.OSFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter 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.v1alpha.OSPolicy.OSFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter 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.v1alpha.OSPolicy.OSFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The `OSFilter` is used to specify the OS filtering criteria for the
+     * resource group.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.OSFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.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(); + osShortName_ = ""; + + osVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(this); + result.osShortName_ = osShortName_; + result.osVersion_ = osVersion_; + 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.v1alpha.OSPolicy.OSFilter) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance()) + return this; + if (!other.getOsShortName().isEmpty()) { + osShortName_ = other.osShortName_; + onChanged(); + } + if (!other.getOsVersion().isEmpty()) { + osVersion_ = other.osVersion_; + 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.v1alpha.OSPolicy.OSFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object osShortName_ = ""; + /** + * + * + *
+       * This should match OS short name emitted by the OS inventory agent.
+       * An empty value matches any OS.
+       * 
+ * + * string os_short_name = 1; + * + * @return The osShortName. + */ + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * This should match OS short name emitted by the OS inventory agent.
+       * An empty value matches any OS.
+       * 
+ * + * string os_short_name = 1; + * + * @return The bytes for osShortName. + */ + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * This should match OS short name emitted by the OS inventory agent.
+       * An empty value matches any OS.
+       * 
+ * + * string os_short_name = 1; + * + * @param value The osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osShortName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * This should match OS short name emitted by the OS inventory agent.
+       * An empty value matches any OS.
+       * 
+ * + * string os_short_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsShortName() { + + osShortName_ = getDefaultInstance().getOsShortName(); + onChanged(); + return this; + } + /** + * + * + *
+       * This should match OS short name emitted by the OS inventory agent.
+       * An empty value matches any OS.
+       * 
+ * + * string os_short_name = 1; + * + * @param value The bytes for osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osShortName_ = value; + onChanged(); + return this; + } + + private java.lang.Object osVersion_ = ""; + /** + * + * + *
+       * This value should match the version emitted by the OS inventory
+       * agent.
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * This value should match the version emitted by the OS inventory
+       * agent.
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * This value should match the version emitted by the OS inventory
+       * agent.
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * 
+ * + * string os_version = 2; + * + * @param value The osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * This value should match the version emitted by the OS inventory
+       * agent.
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * 
+ * + * string os_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearOsVersion() { + + osVersion_ = getDefaultInstance().getOsVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * This value should match the version emitted by the OS inventory
+       * agent.
+       * Prefix matches are supported if asterisk(*) is provided as the
+       * last character. For example, to match all versions with a major
+       * version of `7`, specify the following value for this field `7.*`
+       * 
+ * + * string os_version = 2; + * + * @param value The bytes for osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osVersion_ = 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.v1alpha.OSPolicy.OSFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.OSFilter) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSFilter(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.v1alpha.OSPolicy.OSFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The id of the resource with the following restrictions:
+     * * 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 OS policy.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Required. The id of the resource with the following restrictions:
+     * * 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 OS policy.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return Whether the pkg field is set. + */ + boolean hasPkg(); + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return The pkg. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource getPkg(); + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder getPkgOrBuilder(); + + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return Whether the repository field is set. + */ + boolean hasRepository(); + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return The repository. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource getRepository(); + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder + getRepositoryOrBuilder(); + + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return Whether the exec field is set. + */ + boolean hasExec(); + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return The exec. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource getExec(); + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder getExecOrBuilder(); + + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return Whether the file field is set. + */ + boolean hasFile(); + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return The file. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource getFile(); + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder getFileOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ResourceTypeCase + getResourceTypeCase(); + } + /** + * + * + *
+   * An OS policy resource is used to define the desired state configuration
+   * and provides a specific functionality like installing/removing packages,
+   * executing a script etc.
+   * The system ensures that resources are always in their desired state by
+   * taking necessary actions if they have drifted from their desired state.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource} + */ + public static final class Resource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + ResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Resource() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Resource( + 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(); + + id_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 4; + break; + } + case 42: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder + subBuilder = null; + if (resourceTypeCase_ == 5) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + resourceType_) + .toBuilder(); + } + resourceType_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + resourceType_); + resourceType_ = subBuilder.buildPartial(); + } + resourceTypeCase_ = 5; + 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder.class); + } + + public interface FileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return Whether the remote field is set. + */ + boolean hasRemote(); + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return The remote. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote getRemote(); + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder getRemoteOrBuilder(); + + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return Whether the gcs field is set. + */ + boolean hasGcs(); + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return The gcs. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs getGcs(); + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder getGcsOrBuilder(); + + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return Whether the localPath field is set. + */ + boolean hasLocalPath(); + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return The localPath. + */ + java.lang.String getLocalPath(); + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return The bytes for localPath. + */ + com.google.protobuf.ByteString getLocalPathBytes(); + + /** + * + * + *
+       * Defaults to false. When false, files are subject to validations
+       * based on the file type:
+       * Remote: A checksum must be specified.
+       * Cloud Storage: An object generation number must be specified.
+       * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + boolean getAllowInsecure(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.TypeCase getTypeCase(); + } + /** + * + * + *
+     * A remote or local file.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} + */ + public static final class File extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + FileOrBuilder { + private static final long serialVersionUID = 0L; + // Use File.newBuilder() to construct. + private File(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private File() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new File(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private File( + 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.v1alpha.OSPolicy.Resource.File.Remote.Builder + subBuilder = null; + if (typeCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_) + .toBuilder(); + } + type_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 1; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder subBuilder = + null; + if (typeCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_) + .toBuilder(); + } + type_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 2; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + typeCase_ = 3; + type_ = s; + break; + } + case 32: + { + allowInsecure_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder.class); + } + + public interface RemoteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. URI from which to fetch the object. It should contain both the
+         * protocol and path following the format `{protocol}://{location}`.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+         * Required. URI from which to fetch the object. It should contain both the
+         * protocol and path following the format `{protocol}://{location}`.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+         * SHA256 checksum of the remote file.
+         * 
+ * + * string sha256_checksum = 2; + * + * @return The sha256Checksum. + */ + java.lang.String getSha256Checksum(); + /** + * + * + *
+         * SHA256 checksum of the remote file.
+         * 
+ * + * string sha256_checksum = 2; + * + * @return The bytes for sha256Checksum. + */ + com.google.protobuf.ByteString getSha256ChecksumBytes(); + } + /** + * + * + *
+       * Specifies a file available via some URI.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} + */ + public static final class Remote extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + RemoteOrBuilder { + private static final long serialVersionUID = 0L; + // Use Remote.newBuilder() to construct. + private Remote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Remote() { + uri_ = ""; + sha256Checksum_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Remote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Remote( + 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(); + + uri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sha256Checksum_ = 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + * + * + *
+         * Required. URI from which to fetch the object. It should contain both the
+         * protocol and path following the format `{protocol}://{location}`.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+         * Required. URI from which to fetch the object. It should contain both the
+         * protocol and path following the format `{protocol}://{location}`.
+         * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHA256_CHECKSUM_FIELD_NUMBER = 2; + private volatile java.lang.Object sha256Checksum_; + /** + * + * + *
+         * SHA256 checksum of the remote file.
+         * 
+ * + * string sha256_checksum = 2; + * + * @return The sha256Checksum. + */ + @java.lang.Override + public java.lang.String getSha256Checksum() { + java.lang.Object ref = sha256Checksum_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256Checksum_ = s; + return s; + } + } + /** + * + * + *
+         * SHA256 checksum of the remote file.
+         * 
+ * + * string sha256_checksum = 2; + * + * @return The bytes for sha256Checksum. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSha256ChecksumBytes() { + java.lang.Object ref = sha256Checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256Checksum_ = 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 (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (!getSha256ChecksumBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sha256Checksum_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (!getSha256ChecksumBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sha256Checksum_); + } + 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.v1alpha.OSPolicy.Resource.File.Remote)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getSha256Checksum().equals(other.getSha256Checksum())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SHA256_CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getSha256Checksum().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote 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.v1alpha.OSPolicy.Resource.File.Remote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote 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.v1alpha.OSPolicy.Resource.File.Remote parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote 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.v1alpha.OSPolicy.Resource.File.Remote + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + 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.v1alpha.OSPolicy.Resource.File.Remote parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote 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.v1alpha.OSPolicy.Resource.File.Remote prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Specifies a file available via some URI.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.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(); + uri_ = ""; + + sha256Checksum_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(this); + result.uri_ = uri_; + result.sha256Checksum_ = sha256Checksum_; + 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.v1alpha.OSPolicy.Resource.File.Remote) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getSha256Checksum().isEmpty()) { + sha256Checksum_ = other.sha256Checksum_; + 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.v1alpha.OSPolicy.Resource.File.Remote parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+           * Required. URI from which to fetch the object. It should contain both the
+           * protocol and path following the format `{protocol}://{location}`.
+           * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. URI from which to fetch the object. It should contain both the
+           * protocol and path following the format `{protocol}://{location}`.
+           * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. URI from which to fetch the object. It should contain both the
+           * protocol and path following the format `{protocol}://{location}`.
+           * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. URI from which to fetch the object. It should contain both the
+           * protocol and path following the format `{protocol}://{location}`.
+           * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. URI from which to fetch the object. It should contain both the
+           * protocol and path following the format `{protocol}://{location}`.
+           * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object sha256Checksum_ = ""; + /** + * + * + *
+           * SHA256 checksum of the remote file.
+           * 
+ * + * string sha256_checksum = 2; + * + * @return The sha256Checksum. + */ + public java.lang.String getSha256Checksum() { + java.lang.Object ref = sha256Checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sha256Checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * SHA256 checksum of the remote file.
+           * 
+ * + * string sha256_checksum = 2; + * + * @return The bytes for sha256Checksum. + */ + public com.google.protobuf.ByteString getSha256ChecksumBytes() { + java.lang.Object ref = sha256Checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sha256Checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * SHA256 checksum of the remote file.
+           * 
+ * + * string sha256_checksum = 2; + * + * @param value The sha256Checksum to set. + * @return This builder for chaining. + */ + public Builder setSha256Checksum(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sha256Checksum_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * SHA256 checksum of the remote file.
+           * 
+ * + * string sha256_checksum = 2; + * + * @return This builder for chaining. + */ + public Builder clearSha256Checksum() { + + sha256Checksum_ = getDefaultInstance().getSha256Checksum(); + onChanged(); + return this; + } + /** + * + * + *
+           * SHA256 checksum of the remote file.
+           * 
+ * + * string sha256_checksum = 2; + * + * @param value The bytes for sha256Checksum to set. + * @return This builder for chaining. + */ + public Builder setSha256ChecksumBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sha256Checksum_ = 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.v1alpha.OSPolicy.Resource.File.Remote) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Remote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Remote(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.v1alpha.OSPolicy.Resource.File.Remote + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GcsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Bucket of the Cloud Storage object.
+         * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + java.lang.String getBucket(); + /** + * + * + *
+         * Required. Bucket of the 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 Cloud Storage object.
+         * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The object. + */ + java.lang.String getObject(); + /** + * + * + *
+         * Required. Name of the Cloud Storage object.
+         * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for object. + */ + com.google.protobuf.ByteString getObjectBytes(); + + /** + * + * + *
+         * Generation number of the Cloud Storage object.
+         * 
+ * + * int64 generation = 3; + * + * @return The generation. + */ + long getGeneration(); + } + /** + * + * + *
+       * Specifies a file available as a Cloud Storage Object.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} + */ + public static final class Gcs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + GcsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Gcs.newBuilder() to construct. + private Gcs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Gcs() { + bucket_ = ""; + object_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Gcs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Gcs( + 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: + { + generation_ = 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder.class); + } + + public static final int BUCKET_FIELD_NUMBER = 1; + private volatile java.lang.Object bucket_; + /** + * + * + *
+         * Required. Bucket of the Cloud Storage object.
+         * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucket. + */ + @java.lang.Override + 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 Cloud Storage object.
+         * 
+ * + * string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucket. + */ + @java.lang.Override + 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 Cloud Storage object.
+         * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The object. + */ + @java.lang.Override + 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 Cloud Storage object.
+         * 
+ * + * string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for object. + */ + @java.lang.Override + 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_FIELD_NUMBER = 3; + private long generation_; + /** + * + * + *
+         * Generation number of the Cloud Storage object.
+         * 
+ * + * int64 generation = 3; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + + 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 (generation_ != 0L) { + output.writeInt64(3, generation_); + } + 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 (generation_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generation_); + } + 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.v1alpha.OSPolicy.Resource.File.Gcs)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) obj; + + if (!getBucket().equals(other.getBucket())) return false; + if (!getObject().equals(other.getObject())) return false; + if (getGeneration() != other.getGeneration()) 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_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs 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.v1alpha.OSPolicy.Resource.File.Gcs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs 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.v1alpha.OSPolicy.Resource.File.Gcs parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs 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.v1alpha.OSPolicy.Resource.File.Gcs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + 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.v1alpha.OSPolicy.Resource.File.Gcs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs 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.v1alpha.OSPolicy.Resource.File.Gcs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Specifies a file available as a Cloud Storage Object.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.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_ = ""; + + generation_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(this); + result.bucket_ = bucket_; + result.object_ = object_; + result.generation_ = generation_; + 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.v1alpha.OSPolicy.Resource.File.Gcs) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + .getDefaultInstance()) return this; + if (!other.getBucket().isEmpty()) { + bucket_ = other.bucket_; + onChanged(); + } + if (!other.getObject().isEmpty()) { + object_ = other.object_; + onChanged(); + } + if (other.getGeneration() != 0L) { + setGeneration(other.getGeneration()); + } + 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.v1alpha.OSPolicy.Resource.File.Gcs parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object bucket_ = ""; + /** + * + * + *
+           * Required. Bucket of the 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 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 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 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 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 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 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 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 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 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 generation_; + /** + * + * + *
+           * Generation number of the Cloud Storage object.
+           * 
+ * + * int64 generation = 3; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + /** + * + * + *
+           * Generation number of the Cloud Storage object.
+           * 
+ * + * int64 generation = 3; + * + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(long value) { + + generation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Generation number of the Cloud Storage object.
+           * 
+ * + * int64 generation = 3; + * + * @return This builder for chaining. + */ + public Builder clearGeneration() { + + generation_ = 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.v1alpha.OSPolicy.Resource.File.Gcs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Gcs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Gcs(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.v1alpha.OSPolicy.Resource.File.Gcs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public enum TypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REMOTE(1), + GCS(2), + LOCAL_PATH(3), + TYPE_NOT_SET(0); + private final int value; + + private TypeCase(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 TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: + return REMOTE; + case 2: + return GCS; + case 3: + return LOCAL_PATH; + case 0: + return TYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public static final int REMOTE_FIELD_NUMBER = 1; + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return Whether the remote field is set. + */ + @java.lang.Override + public boolean hasRemote() { + return typeCase_ == 1; + } + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return The remote. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote getRemote() { + if (typeCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.getDefaultInstance(); + } + /** + * + * + *
+       * A generic remote file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder + getRemoteOrBuilder() { + if (typeCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.getDefaultInstance(); + } + + public static final int GCS_FIELD_NUMBER = 2; + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return Whether the gcs field is set. + */ + @java.lang.Override + public boolean hasGcs() { + return typeCase_ == 2; + } + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return The gcs. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs getGcs() { + if (typeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.getDefaultInstance(); + } + /** + * + * + *
+       * A Cloud Storage object.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder + getGcsOrBuilder() { + if (typeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.getDefaultInstance(); + } + + public static final int LOCAL_PATH_FIELD_NUMBER = 3; + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return Whether the localPath field is set. + */ + public boolean hasLocalPath() { + return typeCase_ == 3; + } + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return The localPath. + */ + public java.lang.String getLocalPath() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (ref instanceof java.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 (typeCase_ == 3) { + type_ = s; + } + return s; + } + } + /** + * + * + *
+       * A local path within the VM to use.
+       * 
+ * + * string local_path = 3; + * + * @return The bytes for localPath. + */ + public com.google.protobuf.ByteString getLocalPathBytes() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (typeCase_ == 3) { + type_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_INSECURE_FIELD_NUMBER = 4; + private boolean allowInsecure_; + /** + * + * + *
+       * Defaults to false. When false, files are subject to validations
+       * based on the file type:
+       * Remote: A checksum must be specified.
+       * Cloud Storage: An object generation number must be specified.
+       * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + @java.lang.Override + public boolean getAllowInsecure() { + return allowInsecure_; + } + + 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 (typeCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_); + } + if (typeCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_); + } + if (typeCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); + } + if (allowInsecure_ != false) { + output.writeBool(4, allowInsecure_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (typeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_); + } + if (typeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_); + } + if (typeCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); + } + if (allowInsecure_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowInsecure_); + } + 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.v1alpha.OSPolicy.Resource.File)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) obj; + + if (getAllowInsecure() != other.getAllowInsecure()) return false; + if (!getTypeCase().equals(other.getTypeCase())) return false; + switch (typeCase_) { + case 1: + if (!getRemote().equals(other.getRemote())) return false; + break; + case 2: + if (!getGcs().equals(other.getGcs())) return false; + break; + case 3: + if (!getLocalPath().equals(other.getLocalPath())) 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) + ALLOW_INSECURE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowInsecure()); + switch (typeCase_) { + case 1: + hash = (37 * hash) + REMOTE_FIELD_NUMBER; + hash = (53 * hash) + getRemote().hashCode(); + break; + case 2: + hash = (37 * hash) + GCS_FIELD_NUMBER; + hash = (53 * hash) + getGcs().hashCode(); + break; + case 3: + hash = (37 * hash) + LOCAL_PATH_FIELD_NUMBER; + hash = (53 * hash) + getLocalPath().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File 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.v1alpha.OSPolicy.Resource.File parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File 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.v1alpha.OSPolicy.Resource.File parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File 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.v1alpha.OSPolicy.Resource.File parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File 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.v1alpha.OSPolicy.Resource.File parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File 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.v1alpha.OSPolicy.Resource.File 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 remote or local file.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.File} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.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(); + allowInsecure_ = false; + + typeCase_ = 0; + type_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(this); + if (typeCase_ == 1) { + if (remoteBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = remoteBuilder_.build(); + } + } + if (typeCase_ == 2) { + if (gcsBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = gcsBuilder_.build(); + } + } + if (typeCase_ == 3) { + result.type_ = type_; + } + result.allowInsecure_ = allowInsecure_; + result.typeCase_ = typeCase_; + 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.v1alpha.OSPolicy.Resource.File) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance()) + return this; + if (other.getAllowInsecure() != false) { + setAllowInsecure(other.getAllowInsecure()); + } + switch (other.getTypeCase()) { + case REMOTE: + { + mergeRemote(other.getRemote()); + break; + } + case GCS: + { + mergeGcs(other.getGcs()); + break; + } + case LOCAL_PATH: + { + typeCase_ = 3; + type_ = other.type_; + onChanged(); + break; + } + case TYPE_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.v1alpha.OSPolicy.Resource.File parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int typeCase_ = 0; + private java.lang.Object type_; + + public TypeCase getTypeCase() { + return TypeCase.forNumber(typeCase_); + } + + public Builder clearType() { + typeCase_ = 0; + type_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder> + remoteBuilder_; + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return Whether the remote field is set. + */ + @java.lang.Override + public boolean hasRemote() { + return typeCase_ == 1; + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + * + * @return The remote. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote getRemote() { + if (remoteBuilder_ == null) { + if (typeCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance(); + } else { + if (typeCase_ == 1) { + return remoteBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + public Builder setRemote( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote value) { + if (remoteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + remoteBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + public Builder setRemote( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder + builderForValue) { + if (remoteBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + remoteBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + public Builder mergeRemote( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote value) { + if (remoteBuilder_ == null) { + if (typeCase_ == 1 + && type_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance()) { + type_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 1) { + remoteBuilder_.mergeFrom(value); + } + remoteBuilder_.setMessage(value); + } + typeCase_ = 1; + return this; + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + public Builder clearRemote() { + if (remoteBuilder_ == null) { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 1) { + typeCase_ = 0; + type_ = null; + } + remoteBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder + getRemoteBuilder() { + return getRemoteFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder + getRemoteOrBuilder() { + if ((typeCase_ == 1) && (remoteBuilder_ != null)) { + return remoteBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A generic remote file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote remote = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder> + getRemoteFieldBuilder() { + if (remoteBuilder_ == null) { + if (!(typeCase_ == 1)) { + type_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote + .getDefaultInstance(); + } + remoteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.RemoteOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Remote) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 1; + onChanged(); + ; + return remoteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder> + gcsBuilder_; + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return Whether the gcs field is set. + */ + @java.lang.Override + public boolean hasGcs() { + return typeCase_ == 2; + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + * + * @return The gcs. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs getGcs() { + if (gcsBuilder_ == null) { + if (typeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + .getDefaultInstance(); + } else { + if (typeCase_ == 2) { + return gcsBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + public Builder setGcs(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs value) { + if (gcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + gcsBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + public Builder setGcs( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder builderForValue) { + if (gcsBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + gcsBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 2; + return this; + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + public Builder mergeGcs( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs value) { + if (gcsBuilder_ == null) { + if (typeCase_ == 2 + && type_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + .getDefaultInstance()) { + type_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_) + .mergeFrom(value) + .buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 2) { + gcsBuilder_.mergeFrom(value); + } + gcsBuilder_.setMessage(value); + } + typeCase_ = 2; + return this; + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + public Builder clearGcs() { + if (gcsBuilder_ == null) { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 2) { + typeCase_ = 0; + type_ = null; + } + gcsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder + getGcsBuilder() { + return getGcsFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder + getGcsOrBuilder() { + if ((typeCase_ == 2) && (gcsBuilder_ != null)) { + return gcsBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A Cloud Storage object.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs gcs = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder> + getGcsFieldBuilder() { + if (gcsBuilder_ == null) { + if (!(typeCase_ == 2)) { + type_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.getDefaultInstance(); + } + gcsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.GcsOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Gcs) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 2; + onChanged(); + ; + return gcsBuilder_; + } + + /** + * + * + *
+         * A local path within the VM to use.
+         * 
+ * + * string local_path = 3; + * + * @return Whether the localPath field is set. + */ + @java.lang.Override + public boolean hasLocalPath() { + return typeCase_ == 3; + } + /** + * + * + *
+         * A local path within the VM to use.
+         * 
+ * + * string local_path = 3; + * + * @return The localPath. + */ + @java.lang.Override + public java.lang.String getLocalPath() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (typeCase_ == 3) { + type_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * A local path within the VM to use.
+         * 
+ * + * string local_path = 3; + * + * @return The bytes for localPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocalPathBytes() { + java.lang.Object ref = ""; + if (typeCase_ == 3) { + ref = type_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (typeCase_ == 3) { + type_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * A local path within the VM to use.
+         * 
+ * + * string local_path = 3; + * + * @param value The localPath to set. + * @return This builder for chaining. + */ + public Builder setLocalPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + typeCase_ = 3; + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * A local path within the VM to use.
+         * 
+ * + * string local_path = 3; + * + * @return This builder for chaining. + */ + public Builder clearLocalPath() { + if (typeCase_ == 3) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+         * A local path within the VM to use.
+         * 
+ * + * string local_path = 3; + * + * @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); + typeCase_ = 3; + type_ = value; + onChanged(); + return this; + } + + private boolean allowInsecure_; + /** + * + * + *
+         * Defaults to false. When false, files are subject to validations
+         * based on the file type:
+         * Remote: A checksum must be specified.
+         * Cloud Storage: An object generation number must be specified.
+         * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + @java.lang.Override + public boolean getAllowInsecure() { + return allowInsecure_; + } + /** + * + * + *
+         * Defaults to false. When false, files are subject to validations
+         * based on the file type:
+         * Remote: A checksum must be specified.
+         * Cloud Storage: An object generation number must be specified.
+         * 
+ * + * bool allow_insecure = 4; + * + * @param value The allowInsecure to set. + * @return This builder for chaining. + */ + public Builder setAllowInsecure(boolean value) { + + allowInsecure_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Defaults to false. When false, files are subject to validations
+         * based on the file type:
+         * Remote: A checksum must be specified.
+         * Cloud Storage: An object generation number must be specified.
+         * 
+ * + * bool allow_insecure = 4; + * + * @return This builder for chaining. + */ + public Builder clearAllowInsecure() { + + allowInsecure_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public File parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new File(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.v1alpha.OSPolicy.Resource.File getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PackageResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The desired state the agent should maintain for this package.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for desiredState. + */ + int getDesiredStateValue(); + /** + * + * + *
+       * Required. The desired state the agent should maintain for this package.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The desiredState. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + getDesiredState(); + + /** + * + * + *
+       * A package managed by Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + * @return Whether the apt field is set. + */ + boolean hasApt(); + /** + * + * + *
+       * A package managed by Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + * @return The apt. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT getApt(); + /** + * + * + *
+       * A package managed by Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder + getAptOrBuilder(); + + /** + * + * + *
+       * A deb package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + * @return Whether the deb field is set. + */ + boolean hasDeb(); + /** + * + * + *
+       * A deb package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + * @return The deb. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb getDeb(); + /** + * + * + *
+       * A deb package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder + getDebOrBuilder(); + + /** + * + * + *
+       * A package managed by YUM.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + * @return Whether the yum field is set. + */ + boolean hasYum(); + /** + * + * + *
+       * A package managed by YUM.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + * @return The yum. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM getYum(); + /** + * + * + *
+       * A package managed by YUM.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder + getYumOrBuilder(); + + /** + * + * + *
+       * A package managed by Zypper.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + * + * @return Whether the zypper field is set. + */ + boolean hasZypper(); + /** + * + * + *
+       * A package managed by Zypper.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + * + * @return The zypper. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper getZypper(); + /** + * + * + *
+       * A package managed by Zypper.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder + getZypperOrBuilder(); + + /** + * + * + *
+       * An rpm package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + * @return Whether the rpm field is set. + */ + boolean hasRpm(); + /** + * + * + *
+       * An rpm package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + * @return The rpm. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM getRpm(); + /** + * + * + *
+       * An rpm package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder + getRpmOrBuilder(); + + /** + * + * + *
+       * A package managed by GooGet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + * + * @return Whether the googet field is set. + */ + boolean hasGooget(); + /** + * + * + *
+       * A package managed by GooGet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + * + * @return The googet. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet getGooget(); + /** + * + * + *
+       * A package managed by GooGet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder + getGoogetOrBuilder(); + + /** + * + * + *
+       * An MSI package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + * @return Whether the msi field is set. + */ + boolean hasMsi(); + /** + * + * + *
+       * An MSI package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + * @return The msi. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI getMsi(); + /** + * + * + *
+       * An MSI package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder + getMsiOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.SystemPackageCase + getSystemPackageCase(); + } + /** + * + * + *
+     * A resource that manages a system package.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} + */ + public static final class PackageResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + PackageResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use PackageResource.newBuilder() to construct. + private PackageResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PackageResource() { + desiredState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PackageResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PackageResource( + 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(); + + desiredState_ = rawValue; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.Builder + subBuilder = null; + if (systemPackageCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder + subBuilder = null; + if (systemPackageCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.Builder + subBuilder = null; + if (systemPackageCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 4; + break; + } + case 42: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.Builder + subBuilder = null; + if (systemPackageCase_ == 5) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .Zypper) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 5; + break; + } + case 50: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.Builder + subBuilder = null; + if (systemPackageCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.Builder + subBuilder = null; + if (systemPackageCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .GooGet) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 7; + break; + } + case 66: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.Builder + subBuilder = null; + if (systemPackageCase_ == 8) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_) + .toBuilder(); + } + systemPackage_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_); + systemPackage_ = subBuilder.buildPartial(); + } + systemPackageCase_ = 8; + 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder.class); + } + + /** + * + * + *
+       * The desired state that the OS Config agent maintains on the VM.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState} + */ + public enum DesiredState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Unspecified is invalid.
+         * 
+ * + * DESIRED_STATE_UNSPECIFIED = 0; + */ + DESIRED_STATE_UNSPECIFIED(0), + /** + * + * + *
+         * Ensure that the package is installed.
+         * 
+ * + * INSTALLED = 1; + */ + INSTALLED(1), + /** + * + * + *
+         * The agent ensures that the package is not installed and
+         * uninstalls it if detected.
+         * 
+ * + * REMOVED = 2; + */ + REMOVED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Unspecified is invalid.
+         * 
+ * + * DESIRED_STATE_UNSPECIFIED = 0; + */ + public static final int DESIRED_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Ensure that the package is installed.
+         * 
+ * + * INSTALLED = 1; + */ + public static final int INSTALLED_VALUE = 1; + /** + * + * + *
+         * The agent ensures that the package is not installed and
+         * uninstalls it if detected.
+         * 
+ * + * REMOVED = 2; + */ + public static final int REMOVED_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 DesiredState 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 DesiredState forNumber(int value) { + switch (value) { + case 0: + return DESIRED_STATE_UNSPECIFIED; + case 1: + return INSTALLED; + case 2: + return REMOVED; + 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 DesiredState findValueByNumber(int number) { + return DesiredState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DesiredState[] VALUES = values(); + + public static DesiredState 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 DesiredState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState) + } + + public interface DebOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. A deb package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+         * Required. A deb package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource(); + /** + * + * + *
+         * Required. A deb package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+         * Whether dependencies should also be installed.
+         * - install when false: `dpkg -i package`
+         * - install when true: `apt-get update && apt-get -y install
+         * package.deb`
+         * 
+ * + * bool pull_deps = 2; + * + * @return The pullDeps. + */ + boolean getPullDeps(); + } + /** + * + * + *
+       * A deb package file. dpkg packages only support INSTALLED state.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} + */ + public static final class Deb extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + DebOrBuilder { + private static final long serialVersionUID = 0L; + // Use Deb.newBuilder() to construct. + private Deb(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Deb() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Deb(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Deb( + 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.v1alpha.OSPolicy.Resource.File.Builder subBuilder = + null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + pullDeps_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder + .class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source_; + /** + * + * + *
+         * Required. A deb package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+         * Required. A deb package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource() { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } + /** + * + * + *
+         * Required. A deb package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getSourceOrBuilder() { + return getSource(); + } + + public static final int PULL_DEPS_FIELD_NUMBER = 2; + private boolean pullDeps_; + /** + * + * + *
+         * Whether dependencies should also be installed.
+         * - install when false: `dpkg -i package`
+         * - install when true: `apt-get update && apt-get -y install
+         * package.deb`
+         * 
+ * + * bool pull_deps = 2; + * + * @return The pullDeps. + */ + @java.lang.Override + public boolean getPullDeps() { + return pullDeps_; + } + + 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 (source_ != null) { + output.writeMessage(1, getSource()); + } + if (pullDeps_ != false) { + output.writeBool(2, pullDeps_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSource()); + } + if (pullDeps_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, pullDeps_); + } + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) obj; + + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (getPullDeps() != other.getPullDeps()) 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 (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (37 * hash) + PULL_DEPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPullDeps()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb 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 deb package file. dpkg packages only support INSTALLED state.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.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 (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + pullDeps_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(this); + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + result.pullDeps_ = pullDeps_; + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance()) return this; + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.getPullDeps() != false) { + setPullDeps(other.getPullDeps()); + } + 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.v1alpha.OSPolicy.Resource.PackageResource.Deb parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + sourceBuilder_; + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder + getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+           * Required. A deb package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private boolean pullDeps_; + /** + * + * + *
+           * Whether dependencies should also be installed.
+           * - install when false: `dpkg -i package`
+           * - install when true: `apt-get update && apt-get -y install
+           * package.deb`
+           * 
+ * + * bool pull_deps = 2; + * + * @return The pullDeps. + */ + @java.lang.Override + public boolean getPullDeps() { + return pullDeps_; + } + /** + * + * + *
+           * Whether dependencies should also be installed.
+           * - install when false: `dpkg -i package`
+           * - install when true: `apt-get update && apt-get -y install
+           * package.deb`
+           * 
+ * + * bool pull_deps = 2; + * + * @param value The pullDeps to set. + * @return This builder for chaining. + */ + public Builder setPullDeps(boolean value) { + + pullDeps_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether dependencies should also be installed.
+           * - install when false: `dpkg -i package`
+           * - install when true: `apt-get update && apt-get -y install
+           * package.deb`
+           * 
+ * + * bool pull_deps = 2; + * + * @return This builder for chaining. + */ + public Builder clearPullDeps() { + + pullDeps_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Deb parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Deb(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.v1alpha.OSPolicy.Resource.PackageResource.Deb + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface APTOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+       * A package managed by APT.
+       * - install: `apt-get update && apt-get -y install [name]`
+       * - remove: `apt-get -y remove [name]`
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} + */ + public static final class APT extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + APTOrBuilder { + private static final long serialVersionUID = 0L; + // Use APT.newBuilder() to construct. + private APT(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private APT() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new APT(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private APT( + 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.OSPolicy.Resource.PackageResource.APT)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) 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.v1alpha.OSPolicy.Resource.PackageResource.APT + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + 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.v1alpha.OSPolicy.Resource.PackageResource.APT + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + 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.v1alpha.OSPolicy.Resource.PackageResource.APT + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + 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.v1alpha.OSPolicy.Resource.PackageResource.APT + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + 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.v1alpha.OSPolicy.Resource.PackageResource.APT + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + 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.v1alpha.OSPolicy.Resource.PackageResource.APT 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 package managed by APT.
+         * - install: `apt-get update && apt-get -y install [name]`
+         * - remove: `apt-get -y remove [name]`
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(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.v1alpha.OSPolicy.Resource.PackageResource.APT) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .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.v1alpha.OSPolicy.Resource.PackageResource.APT parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @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.v1alpha.OSPolicy.Resource.PackageResource.APT) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public APT parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new APT(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.v1alpha.OSPolicy.Resource.PackageResource.APT + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RPMOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. An rpm package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+         * Required. An rpm package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource(); + /** + * + * + *
+         * Required. An rpm package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+         * Whether dependencies should also be installed.
+         * - install when false: `rpm --upgrade --replacepkgs package.rpm`
+         * - install when true: `yum -y install package.rpm` or
+         * `zypper -y install package.rpm`
+         * 
+ * + * bool pull_deps = 2; + * + * @return The pullDeps. + */ + boolean getPullDeps(); + } + /** + * + * + *
+       * An RPM package file. RPM packages only support INSTALLED state.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} + */ + public static final class RPM extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + RPMOrBuilder { + private static final long serialVersionUID = 0L; + // Use RPM.newBuilder() to construct. + private RPM(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RPM() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RPM(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RPM( + 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.v1alpha.OSPolicy.Resource.File.Builder subBuilder = + null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 16: + { + pullDeps_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .Builder + .class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source_; + /** + * + * + *
+         * Required. An rpm package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+         * Required. An rpm package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource() { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } + /** + * + * + *
+         * Required. An rpm package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getSourceOrBuilder() { + return getSource(); + } + + public static final int PULL_DEPS_FIELD_NUMBER = 2; + private boolean pullDeps_; + /** + * + * + *
+         * Whether dependencies should also be installed.
+         * - install when false: `rpm --upgrade --replacepkgs package.rpm`
+         * - install when true: `yum -y install package.rpm` or
+         * `zypper -y install package.rpm`
+         * 
+ * + * bool pull_deps = 2; + * + * @return The pullDeps. + */ + @java.lang.Override + public boolean getPullDeps() { + return pullDeps_; + } + + 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 (source_ != null) { + output.writeMessage(1, getSource()); + } + if (pullDeps_ != false) { + output.writeBool(2, pullDeps_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSource()); + } + if (pullDeps_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, pullDeps_); + } + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) obj; + + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (getPullDeps() != other.getPullDeps()) 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 (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (37 * hash) + PULL_DEPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPullDeps()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * An RPM package file. RPM packages only support INSTALLED state.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.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 (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + pullDeps_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(this); + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + result.pullDeps_ = pullDeps_; + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance()) return this; + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (other.getPullDeps() != false) { + setPullDeps(other.getPullDeps()); + } + 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.v1alpha.OSPolicy.Resource.PackageResource.RPM parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + sourceBuilder_; + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder + getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+           * Required. An rpm package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private boolean pullDeps_; + /** + * + * + *
+           * Whether dependencies should also be installed.
+           * - install when false: `rpm --upgrade --replacepkgs package.rpm`
+           * - install when true: `yum -y install package.rpm` or
+           * `zypper -y install package.rpm`
+           * 
+ * + * bool pull_deps = 2; + * + * @return The pullDeps. + */ + @java.lang.Override + public boolean getPullDeps() { + return pullDeps_; + } + /** + * + * + *
+           * Whether dependencies should also be installed.
+           * - install when false: `rpm --upgrade --replacepkgs package.rpm`
+           * - install when true: `yum -y install package.rpm` or
+           * `zypper -y install package.rpm`
+           * 
+ * + * bool pull_deps = 2; + * + * @param value The pullDeps to set. + * @return This builder for chaining. + */ + public Builder setPullDeps(boolean value) { + + pullDeps_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether dependencies should also be installed.
+           * - install when false: `rpm --upgrade --replacepkgs package.rpm`
+           * - install when true: `yum -y install package.rpm` or
+           * `zypper -y install package.rpm`
+           * 
+ * + * bool pull_deps = 2; + * + * @return This builder for chaining. + */ + public Builder clearPullDeps() { + + pullDeps_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RPM parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RPM(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.v1alpha.OSPolicy.Resource.PackageResource.RPM + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YUMOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+       * A package managed by YUM.
+       * - install: `yum -y install package`
+       * - remove: `yum -y remove package`
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} + */ + public static final class YUM extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + YUMOrBuilder { + private static final long serialVersionUID = 0L; + // Use YUM.newBuilder() to construct. + private YUM(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YUM() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YUM(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private YUM( + 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.OSPolicy.Resource.PackageResource.YUM)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) 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.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + 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.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + 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.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + 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.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + 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.v1alpha.OSPolicy.Resource.PackageResource.YUM + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + 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.v1alpha.OSPolicy.Resource.PackageResource.YUM 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 package managed by YUM.
+         * - install: `yum -y install package`
+         * - remove: `yum -y remove package`
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(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.v1alpha.OSPolicy.Resource.PackageResource.YUM) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .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.v1alpha.OSPolicy.Resource.PackageResource.YUM parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @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.v1alpha.OSPolicy.Resource.PackageResource.YUM) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YUM parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new YUM(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.v1alpha.OSPolicy.Resource.PackageResource.YUM + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ZypperOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+       * A package managed by Zypper.
+       * - install: `zypper -y install package`
+       * - remove: `zypper -y rm package`
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} + */ + public static final class Zypper extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + ZypperOrBuilder { + private static final long serialVersionUID = 0L; + // Use Zypper.newBuilder() to construct. + private Zypper(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Zypper() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Zypper(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Zypper( + 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper 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 package managed by Zypper.
+         * - install: `zypper -y install package`
+         * - remove: `zypper -y rm package`
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper( + 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.v1alpha.OSPolicy.Resource.PackageResource.Zypper) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @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.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .Zypper + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Zypper parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Zypper(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.v1alpha.OSPolicy.Resource.PackageResource.Zypper + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GooGetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+       * A package managed by GooGet.
+       * - install: `googet -noconfirm install package`
+       * - remove: `googet -noconfirm remove package`
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} + */ + public static final class GooGet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + GooGetOrBuilder { + private static final long serialVersionUID = 0L; + // Use GooGet.newBuilder() to construct. + private GooGet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GooGet() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GooGet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GooGet( + 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+         * Required. Package name.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet 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 package managed by GooGet.
+         * - install: `googet -noconfirm install package`
+         * - remove: `googet -noconfirm remove package`
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet( + 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.v1alpha.OSPolicy.Resource.PackageResource.GooGet) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Package name.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @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.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .GooGet + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GooGet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GooGet(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.v1alpha.OSPolicy.Resource.PackageResource.GooGet + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MSIOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The MSI package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + /** + * + * + *
+         * Required. The MSI package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource(); + /** + * + * + *
+         * Required. The MSI package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder getSourceOrBuilder(); + + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @return A list containing the properties. + */ + java.util.List getPropertiesList(); + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @return The count of properties. + */ + int getPropertiesCount(); + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @param index The index of the element to return. + * @return The properties at the given index. + */ + java.lang.String getProperties(int index); + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @param index The index of the value to return. + * @return The bytes of the properties at the given index. + */ + com.google.protobuf.ByteString getPropertiesBytes(int index); + } + /** + * + * + *
+       * An MSI package. MSI packages only support INSTALLED state.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} + */ + public static final class MSI extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + MSIOrBuilder { + private static final long serialVersionUID = 0L; + // Use MSI.newBuilder() to construct. + private MSI(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MSI() { + properties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MSI(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MSI( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder subBuilder = + null; + if (source_ != null) { + subBuilder = source_.toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(source_); + source_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + properties_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + properties_.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)) { + properties_ = properties_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .Builder + .class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source_; + /** + * + * + *
+         * Required. The MSI package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return source_ != null; + } + /** + * + * + *
+         * Required. The MSI package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource() { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } + /** + * + * + *
+         * Required. The MSI package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getSourceOrBuilder() { + return getSource(); + } + + public static final int PROPERTIES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList properties_; + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @return A list containing the properties. + */ + public com.google.protobuf.ProtocolStringList getPropertiesList() { + return properties_; + } + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @return The count of properties. + */ + public int getPropertiesCount() { + return properties_.size(); + } + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @param index The index of the element to return. + * @return The properties at the given index. + */ + public java.lang.String getProperties(int index) { + return properties_.get(index); + } + /** + * + * + *
+         * Additional properties to use during installation.
+         * This should be in the format of Property=Setting.
+         * Appended to the defaults of `ACTION=INSTALL
+         * REBOOT=ReallySuppress`.
+         * 
+ * + * repeated string properties = 2; + * + * @param index The index of the value to return. + * @return The bytes of the properties at the given index. + */ + public com.google.protobuf.ByteString getPropertiesBytes(int index) { + return properties_.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 (source_ != null) { + output.writeMessage(1, getSource()); + } + for (int i = 0; i < properties_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, properties_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (source_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSource()); + } + { + int dataSize = 0; + for (int i = 0; i < properties_.size(); i++) { + dataSize += computeStringSizeNoTag(properties_.getRaw(i)); + } + size += dataSize; + size += 1 * getPropertiesList().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.v1alpha.OSPolicy.Resource.PackageResource.MSI)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) obj; + + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (!getPropertiesList().equals(other.getPropertiesList())) 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 (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (getPropertiesCount() > 0) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * An MSI package. MSI packages only support INSTALLED state.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.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 (sourceBuilder_ == null) { + source_ = null; + } else { + source_ = null; + sourceBuilder_ = null; + } + properties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(this); + int from_bitField0_ = bitField0_; + if (sourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = sourceBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + properties_ = properties_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.properties_ = properties_; + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance()) return this; + if (other.hasSource()) { + mergeSource(other.getSource()); + } + if (!other.properties_.isEmpty()) { + if (properties_.isEmpty()) { + properties_ = other.properties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePropertiesIsMutable(); + properties_.addAll(other.properties_); + } + 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.v1alpha.OSPolicy.Resource.PackageResource.MSI parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + sourceBuilder_; + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return sourceBuilder_ != null || source_ != null; + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The source. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + sourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSource( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSource( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (sourceBuilder_ == null) { + if (source_ != null) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.newBuilder(source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + sourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSource() { + if (sourceBuilder_ == null) { + source_ = null; + onChanged(); + } else { + source_ = null; + sourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder + getSourceBuilder() { + + onChanged(); + return getSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance() + : source_; + } + } + /** + * + * + *
+           * Required. The MSI package.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + getSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + private com.google.protobuf.LazyStringList properties_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + properties_ = new com.google.protobuf.LazyStringArrayList(properties_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @return A list containing the properties. + */ + public com.google.protobuf.ProtocolStringList getPropertiesList() { + return properties_.getUnmodifiableView(); + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @return The count of properties. + */ + public int getPropertiesCount() { + return properties_.size(); + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @param index The index of the element to return. + * @return The properties at the given index. + */ + public java.lang.String getProperties(int index) { + return properties_.get(index); + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @param index The index of the value to return. + * @return The bytes of the properties at the given index. + */ + public com.google.protobuf.ByteString getPropertiesBytes(int index) { + return properties_.getByteString(index); + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @param index The index to set the value at. + * @param value The properties to set. + * @return This builder for chaining. + */ + public Builder setProperties(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @param value The properties to add. + * @return This builder for chaining. + */ + public Builder addProperties(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertiesIsMutable(); + properties_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @param values The properties to add. + * @return This builder for chaining. + */ + public Builder addAllProperties(java.lang.Iterable values) { + ensurePropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, properties_); + onChanged(); + return this; + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @return This builder for chaining. + */ + public Builder clearProperties() { + properties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Additional properties to use during installation.
+           * This should be in the format of Property=Setting.
+           * Appended to the defaults of `ACTION=INSTALL
+           * REBOOT=ReallySuppress`.
+           * 
+ * + * repeated string properties = 2; + * + * @param value The bytes of the properties to add. + * @return This builder for chaining. + */ + public Builder addPropertiesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePropertiesIsMutable(); + properties_.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.v1alpha.OSPolicy.Resource.PackageResource.MSI) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MSI parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MSI(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.v1alpha.OSPolicy.Resource.PackageResource.MSI + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int systemPackageCase_ = 0; + private java.lang.Object systemPackage_; + + public enum SystemPackageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + APT(2), + DEB(3), + YUM(4), + ZYPPER(5), + RPM(6), + GOOGET(7), + MSI(8), + SYSTEMPACKAGE_NOT_SET(0); + private final int value; + + private SystemPackageCase(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 SystemPackageCase valueOf(int value) { + return forNumber(value); + } + + public static SystemPackageCase forNumber(int value) { + switch (value) { + case 2: + return APT; + case 3: + return DEB; + case 4: + return YUM; + case 5: + return ZYPPER; + case 6: + return RPM; + case 7: + return GOOGET; + case 8: + return MSI; + case 0: + return SYSTEMPACKAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SystemPackageCase getSystemPackageCase() { + return SystemPackageCase.forNumber(systemPackageCase_); + } + + public static final int DESIRED_STATE_FIELD_NUMBER = 1; + private int desiredState_; + /** + * + * + *
+       * Required. The desired state the agent should maintain for this package.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for desiredState. + */ + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; + } + /** + * + * + *
+       * Required. The desired state the agent should maintain for this package.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The desiredState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + .valueOf(desiredState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + .UNRECOGNIZED + : result; + } + + public static final int APT_FIELD_NUMBER = 2; + /** + * + * + *
+       * A package managed by Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return systemPackageCase_ == 2; + } + /** + * + * + *
+       * A package managed by Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT getApt() { + if (systemPackageCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } + /** + * + * + *
+       * A package managed by Apt.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder + getAptOrBuilder() { + if (systemPackageCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } + + public static final int DEB_FIELD_NUMBER = 3; + /** + * + * + *
+       * A deb package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + * @return Whether the deb field is set. + */ + @java.lang.Override + public boolean hasDeb() { + return systemPackageCase_ == 3; + } + /** + * + * + *
+       * A deb package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + * @return The deb. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb getDeb() { + if (systemPackageCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } + /** + * + * + *
+       * A deb package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder + getDebOrBuilder() { + if (systemPackageCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } + + public static final int YUM_FIELD_NUMBER = 4; + /** + * + * + *
+       * A package managed by YUM.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return systemPackageCase_ == 4; + } + /** + * + * + *
+       * A package managed by YUM.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM getYum() { + if (systemPackageCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } + /** + * + * + *
+       * A package managed by YUM.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder + getYumOrBuilder() { + if (systemPackageCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } + + public static final int ZYPPER_FIELD_NUMBER = 5; + /** + * + * + *
+       * A package managed by Zypper.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return systemPackageCase_ == 5; + } + /** + * + * + *
+       * A package managed by Zypper.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + getZypper() { + if (systemPackageCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } + /** + * + * + *
+       * A package managed by Zypper.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder + getZypperOrBuilder() { + if (systemPackageCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } + + public static final int RPM_FIELD_NUMBER = 6; + /** + * + * + *
+       * An rpm package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + * @return Whether the rpm field is set. + */ + @java.lang.Override + public boolean hasRpm() { + return systemPackageCase_ == 6; + } + /** + * + * + *
+       * An rpm package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + * @return The rpm. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM getRpm() { + if (systemPackageCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } + /** + * + * + *
+       * An rpm package file.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder + getRpmOrBuilder() { + if (systemPackageCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } + + public static final int GOOGET_FIELD_NUMBER = 7; + /** + * + * + *
+       * A package managed by GooGet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + * + * @return Whether the googet field is set. + */ + @java.lang.Override + public boolean hasGooget() { + return systemPackageCase_ == 7; + } + /** + * + * + *
+       * A package managed by GooGet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + * + * @return The googet. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + getGooget() { + if (systemPackageCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } + /** + * + * + *
+       * A package managed by GooGet.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder + getGoogetOrBuilder() { + if (systemPackageCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } + + public static final int MSI_FIELD_NUMBER = 8; + /** + * + * + *
+       * An MSI package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + * @return Whether the msi field is set. + */ + @java.lang.Override + public boolean hasMsi() { + return systemPackageCase_ == 8; + } + /** + * + * + *
+       * An MSI package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + * @return The msi. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI getMsi() { + if (systemPackageCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } + /** + * + * + *
+       * An MSI package.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder + getMsiOrBuilder() { + if (systemPackageCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (desiredState_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + .DESIRED_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, desiredState_); + } + if (systemPackageCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_); + } + if (systemPackageCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_); + } + if (systemPackageCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_); + } + if (systemPackageCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_); + } + if (systemPackageCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_); + } + if (systemPackageCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_); + } + if (systemPackageCase_ == 8) { + output.writeMessage( + 8, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (desiredState_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + .DESIRED_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, desiredState_); + } + if (systemPackageCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_); + } + if (systemPackageCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_); + } + if (systemPackageCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_); + } + if (systemPackageCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_); + } + if (systemPackageCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_); + } + if (systemPackageCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_); + } + if (systemPackageCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_); + } + 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.v1alpha.OSPolicy.Resource.PackageResource)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) obj; + + if (desiredState_ != other.desiredState_) return false; + if (!getSystemPackageCase().equals(other.getSystemPackageCase())) return false; + switch (systemPackageCase_) { + case 2: + if (!getApt().equals(other.getApt())) return false; + break; + case 3: + if (!getDeb().equals(other.getDeb())) return false; + break; + case 4: + if (!getYum().equals(other.getYum())) return false; + break; + case 5: + if (!getZypper().equals(other.getZypper())) return false; + break; + case 6: + if (!getRpm().equals(other.getRpm())) return false; + break; + case 7: + if (!getGooget().equals(other.getGooget())) return false; + break; + case 8: + if (!getMsi().equals(other.getMsi())) 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) + DESIRED_STATE_FIELD_NUMBER; + hash = (53 * hash) + desiredState_; + switch (systemPackageCase_) { + case 2: + hash = (37 * hash) + APT_FIELD_NUMBER; + hash = (53 * hash) + getApt().hashCode(); + break; + case 3: + hash = (37 * hash) + DEB_FIELD_NUMBER; + hash = (53 * hash) + getDeb().hashCode(); + break; + case 4: + hash = (37 * hash) + YUM_FIELD_NUMBER; + hash = (53 * hash) + getYum().hashCode(); + break; + case 5: + hash = (37 * hash) + ZYPPER_FIELD_NUMBER; + hash = (53 * hash) + getZypper().hashCode(); + break; + case 6: + hash = (37 * hash) + RPM_FIELD_NUMBER; + hash = (53 * hash) + getRpm().hashCode(); + break; + case 7: + hash = (37 * hash) + GOOGET_FIELD_NUMBER; + hash = (53 * hash) + getGooget().hashCode(); + break; + case 8: + hash = (37 * hash) + MSI_FIELD_NUMBER; + hash = (53 * hash) + getMsi().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource 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.v1alpha.OSPolicy.Resource.PackageResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource 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.v1alpha.OSPolicy.Resource.PackageResource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource 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.v1alpha.OSPolicy.Resource.PackageResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + 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.v1alpha.OSPolicy.Resource.PackageResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource 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.v1alpha.OSPolicy.Resource.PackageResource 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 resource that manages a system package.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.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(); + desiredState_ = 0; + + systemPackageCase_ = 0; + systemPackage_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(this); + result.desiredState_ = desiredState_; + if (systemPackageCase_ == 2) { + if (aptBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = aptBuilder_.build(); + } + } + if (systemPackageCase_ == 3) { + if (debBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = debBuilder_.build(); + } + } + if (systemPackageCase_ == 4) { + if (yumBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = yumBuilder_.build(); + } + } + if (systemPackageCase_ == 5) { + if (zypperBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = zypperBuilder_.build(); + } + } + if (systemPackageCase_ == 6) { + if (rpmBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = rpmBuilder_.build(); + } + } + if (systemPackageCase_ == 7) { + if (googetBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = googetBuilder_.build(); + } + } + if (systemPackageCase_ == 8) { + if (msiBuilder_ == null) { + result.systemPackage_ = systemPackage_; + } else { + result.systemPackage_ = msiBuilder_.build(); + } + } + result.systemPackageCase_ = systemPackageCase_; + 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.v1alpha.OSPolicy.Resource.PackageResource) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance()) return this; + if (other.desiredState_ != 0) { + setDesiredStateValue(other.getDesiredStateValue()); + } + switch (other.getSystemPackageCase()) { + case APT: + { + mergeApt(other.getApt()); + break; + } + case DEB: + { + mergeDeb(other.getDeb()); + break; + } + case YUM: + { + mergeYum(other.getYum()); + break; + } + case ZYPPER: + { + mergeZypper(other.getZypper()); + break; + } + case RPM: + { + mergeRpm(other.getRpm()); + break; + } + case GOOGET: + { + mergeGooget(other.getGooget()); + break; + } + case MSI: + { + mergeMsi(other.getMsi()); + break; + } + case SYSTEMPACKAGE_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.v1alpha.OSPolicy.Resource.PackageResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int systemPackageCase_ = 0; + private java.lang.Object systemPackage_; + + public SystemPackageCase getSystemPackageCase() { + return SystemPackageCase.forNumber(systemPackageCase_); + } + + public Builder clearSystemPackage() { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + return this; + } + + private int desiredState_ = 0; + /** + * + * + *
+         * Required. The desired state the agent should maintain for this package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for desiredState. + */ + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; + } + /** + * + * + *
+         * Required. The desired state the agent should maintain for this package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for desiredState to set. + * @return This builder for chaining. + */ + public Builder setDesiredStateValue(int value) { + + desiredState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The desired state the agent should maintain for this package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The desiredState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + .valueOf(desiredState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. The desired state the agent should maintain for this package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The desiredState to set. + * @return This builder for chaining. + */ + public Builder setDesiredState( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState + value) { + if (value == null) { + throw new NullPointerException(); + } + + desiredState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The desired state the agent should maintain for this package.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearDesiredState() { + + desiredState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder> + aptBuilder_; + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return systemPackageCase_ == 2; + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT getApt() { + if (aptBuilder_ == null) { + if (systemPackageCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 2) { + return aptBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + public Builder setApt( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT value) { + if (aptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + aptBuilder_.setMessage(value); + } + systemPackageCase_ = 2; + return this; + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + public Builder setApt( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.Builder + builderForValue) { + if (aptBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + aptBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 2; + return this; + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + public Builder mergeApt( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT value) { + if (aptBuilder_ == null) { + if (systemPackageCase_ == 2 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 2) { + aptBuilder_.mergeFrom(value); + } + aptBuilder_.setMessage(value); + } + systemPackageCase_ = 2; + return this; + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + public Builder clearApt() { + if (aptBuilder_ == null) { + if (systemPackageCase_ == 2) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 2) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + aptBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.Builder + getAptBuilder() { + return getAptFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder + getAptOrBuilder() { + if ((systemPackageCase_ == 2) && (aptBuilder_ != null)) { + return aptBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by Apt.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT apt = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APTOrBuilder> + getAptFieldBuilder() { + if (aptBuilder_ == null) { + if (!(systemPackageCase_ == 2)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT + .getDefaultInstance(); + } + aptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .APTOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.APT) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 2; + onChanged(); + ; + return aptBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder> + debBuilder_; + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + * + * @return Whether the deb field is set. + */ + @java.lang.Override + public boolean hasDeb() { + return systemPackageCase_ == 3; + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + * + * @return The deb. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb getDeb() { + if (debBuilder_ == null) { + if (systemPackageCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 3) { + return debBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + public Builder setDeb( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb value) { + if (debBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + debBuilder_.setMessage(value); + } + systemPackageCase_ = 3; + return this; + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + public Builder setDeb( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder + builderForValue) { + if (debBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + debBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 3; + return this; + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + public Builder mergeDeb( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb value) { + if (debBuilder_ == null) { + if (systemPackageCase_ == 3 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 3) { + debBuilder_.mergeFrom(value); + } + debBuilder_.setMessage(value); + } + systemPackageCase_ = 3; + return this; + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + public Builder clearDeb() { + if (debBuilder_ == null) { + if (systemPackageCase_ == 3) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 3) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + debBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder + getDebBuilder() { + return getDebFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder + getDebOrBuilder() { + if ((systemPackageCase_ == 3) && (debBuilder_ != null)) { + return debBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A deb package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb deb = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.DebOrBuilder> + getDebFieldBuilder() { + if (debBuilder_ == null) { + if (!(systemPackageCase_ == 3)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb + .getDefaultInstance(); + } + debBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .DebOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Deb) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 3; + onChanged(); + ; + return debBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder> + yumBuilder_; + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return systemPackageCase_ == 4; + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM getYum() { + if (yumBuilder_ == null) { + if (systemPackageCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 4) { + return yumBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + public Builder setYum( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM value) { + if (yumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + yumBuilder_.setMessage(value); + } + systemPackageCase_ = 4; + return this; + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + public Builder setYum( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.Builder + builderForValue) { + if (yumBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + yumBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 4; + return this; + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + public Builder mergeYum( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM value) { + if (yumBuilder_ == null) { + if (systemPackageCase_ == 4 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 4) { + yumBuilder_.mergeFrom(value); + } + yumBuilder_.setMessage(value); + } + systemPackageCase_ = 4; + return this; + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + public Builder clearYum() { + if (yumBuilder_ == null) { + if (systemPackageCase_ == 4) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 4) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + yumBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.Builder + getYumBuilder() { + return getYumFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder + getYumOrBuilder() { + if ((systemPackageCase_ == 4) && (yumBuilder_ != null)) { + return yumBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by YUM.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM yum = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUMOrBuilder> + getYumFieldBuilder() { + if (yumBuilder_ == null) { + if (!(systemPackageCase_ == 4)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM + .getDefaultInstance(); + } + yumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .YUMOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.YUM) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 4; + onChanged(); + ; + return yumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder> + zypperBuilder_; + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return systemPackageCase_ == 5; + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + getZypper() { + if (zypperBuilder_ == null) { + if (systemPackageCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 5) { + return zypperBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + public Builder setZypper( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper value) { + if (zypperBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + zypperBuilder_.setMessage(value); + } + systemPackageCase_ = 5; + return this; + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + public Builder setZypper( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.Builder + builderForValue) { + if (zypperBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + zypperBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 5; + return this; + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + public Builder mergeZypper( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper value) { + if (zypperBuilder_ == null) { + if (systemPackageCase_ == 5 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .Zypper) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 5) { + zypperBuilder_.mergeFrom(value); + } + zypperBuilder_.setMessage(value); + } + systemPackageCase_ = 5; + return this; + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + public Builder clearZypper() { + if (zypperBuilder_ == null) { + if (systemPackageCase_ == 5) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 5) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + zypperBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.Builder + getZypperBuilder() { + return getZypperFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder + getZypperOrBuilder() { + if ((systemPackageCase_ == 5) && (zypperBuilder_ != null)) { + return zypperBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by Zypper.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.ZypperOrBuilder> + getZypperFieldBuilder() { + if (zypperBuilder_ == null) { + if (!(systemPackageCase_ == 5)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .getDefaultInstance(); + } + zypperBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .ZypperOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Zypper) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 5; + onChanged(); + ; + return zypperBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder> + rpmBuilder_; + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + * + * @return Whether the rpm field is set. + */ + @java.lang.Override + public boolean hasRpm() { + return systemPackageCase_ == 6; + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + * + * @return The rpm. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM getRpm() { + if (rpmBuilder_ == null) { + if (systemPackageCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 6) { + return rpmBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + public Builder setRpm( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM value) { + if (rpmBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + rpmBuilder_.setMessage(value); + } + systemPackageCase_ = 6; + return this; + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + public Builder setRpm( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.Builder + builderForValue) { + if (rpmBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + rpmBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 6; + return this; + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + public Builder mergeRpm( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM value) { + if (rpmBuilder_ == null) { + if (systemPackageCase_ == 6 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 6) { + rpmBuilder_.mergeFrom(value); + } + rpmBuilder_.setMessage(value); + } + systemPackageCase_ = 6; + return this; + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + public Builder clearRpm() { + if (rpmBuilder_ == null) { + if (systemPackageCase_ == 6) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 6) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + rpmBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.Builder + getRpmBuilder() { + return getRpmFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder + getRpmOrBuilder() { + if ((systemPackageCase_ == 6) && (rpmBuilder_ != null)) { + return rpmBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 6) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } + } + /** + * + * + *
+         * An rpm package file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPMOrBuilder> + getRpmFieldBuilder() { + if (rpmBuilder_ == null) { + if (!(systemPackageCase_ == 6)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM + .getDefaultInstance(); + } + rpmBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .RPMOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.RPM) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 6; + onChanged(); + ; + return rpmBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder> + googetBuilder_; + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + * + * @return Whether the googet field is set. + */ + @java.lang.Override + public boolean hasGooget() { + return systemPackageCase_ == 7; + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + * + * @return The googet. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + getGooget() { + if (googetBuilder_ == null) { + if (systemPackageCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 7) { + return googetBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + public Builder setGooget( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet value) { + if (googetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + googetBuilder_.setMessage(value); + } + systemPackageCase_ = 7; + return this; + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + public Builder setGooget( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.Builder + builderForValue) { + if (googetBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + googetBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 7; + return this; + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + public Builder mergeGooget( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet value) { + if (googetBuilder_ == null) { + if (systemPackageCase_ == 7 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .GooGet) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 7) { + googetBuilder_.mergeFrom(value); + } + googetBuilder_.setMessage(value); + } + systemPackageCase_ = 7; + return this; + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + public Builder clearGooget() { + if (googetBuilder_ == null) { + if (systemPackageCase_ == 7) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 7) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + googetBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.Builder + getGoogetBuilder() { + return getGoogetFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder + getGoogetOrBuilder() { + if ((systemPackageCase_ == 7) && (googetBuilder_ != null)) { + return googetBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 7) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A package managed by GooGet.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGetOrBuilder> + getGoogetFieldBuilder() { + if (googetBuilder_ == null) { + if (!(systemPackageCase_ == 7)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .getDefaultInstance(); + } + googetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .GooGetOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.GooGet) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 7; + onChanged(); + ; + return googetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder> + msiBuilder_; + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + * + * @return Whether the msi field is set. + */ + @java.lang.Override + public boolean hasMsi() { + return systemPackageCase_ == 8; + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + * + * @return The msi. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI getMsi() { + if (msiBuilder_ == null) { + if (systemPackageCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } else { + if (systemPackageCase_ == 8) { + return msiBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + public Builder setMsi( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI value) { + if (msiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemPackage_ = value; + onChanged(); + } else { + msiBuilder_.setMessage(value); + } + systemPackageCase_ = 8; + return this; + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + public Builder setMsi( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.Builder + builderForValue) { + if (msiBuilder_ == null) { + systemPackage_ = builderForValue.build(); + onChanged(); + } else { + msiBuilder_.setMessage(builderForValue.build()); + } + systemPackageCase_ = 8; + return this; + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + public Builder mergeMsi( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI value) { + if (msiBuilder_ == null) { + if (systemPackageCase_ == 8 + && systemPackage_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance()) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_) + .mergeFrom(value) + .buildPartial(); + } else { + systemPackage_ = value; + } + onChanged(); + } else { + if (systemPackageCase_ == 8) { + msiBuilder_.mergeFrom(value); + } + msiBuilder_.setMessage(value); + } + systemPackageCase_ = 8; + return this; + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + public Builder clearMsi() { + if (msiBuilder_ == null) { + if (systemPackageCase_ == 8) { + systemPackageCase_ = 0; + systemPackage_ = null; + onChanged(); + } + } else { + if (systemPackageCase_ == 8) { + systemPackageCase_ = 0; + systemPackage_ = null; + } + msiBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.Builder + getMsiBuilder() { + return getMsiFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder + getMsiOrBuilder() { + if ((systemPackageCase_ == 8) && (msiBuilder_ != null)) { + return msiBuilder_.getMessageOrBuilder(); + } else { + if (systemPackageCase_ == 8) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } + } + /** + * + * + *
+         * An MSI package.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI msi = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSIOrBuilder> + getMsiFieldBuilder() { + if (msiBuilder_ == null) { + if (!(systemPackageCase_ == 8)) { + systemPackage_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI + .getDefaultInstance(); + } + msiBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .MSIOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.MSI) + systemPackage_, + getParentForChildren(), + isClean()); + systemPackage_ = null; + } + systemPackageCase_ = 8; + onChanged(); + ; + return msiBuilder_; + } + + @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.v1alpha.OSPolicy.Resource.PackageResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PackageResource(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.v1alpha.OSPolicy.Resource.PackageResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RepositoryResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + * + * @return Whether the apt field is set. + */ + boolean hasApt(); + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + * + * @return The apt. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository getApt(); + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepositoryOrBuilder + getAptOrBuilder(); + + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + * + * @return Whether the yum field is set. + */ + boolean hasYum(); + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + * + * @return The yum. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository getYum(); + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepositoryOrBuilder + getYumOrBuilder(); + + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + * + * @return Whether the zypper field is set. + */ + boolean hasZypper(); + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + * + * @return The zypper. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + getZypper(); + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder + getZypperOrBuilder(); + + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + * + * @return Whether the goo field is set. + */ + boolean hasGoo(); + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + * + * @return The goo. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository getGoo(); + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepositoryOrBuilder + getGooOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.RepositoryCase + getRepositoryCase(); + } + /** + * + * + *
+     * A resource that manages a package repository.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} + */ + public static final class RepositoryResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + RepositoryResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use RepositoryResource.newBuilder() to construct. + private RepositoryResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RepositoryResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RepositoryResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RepositoryResource( + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.Builder + subBuilder = null; + if (repositoryCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 1; + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.Builder + subBuilder = null; + if (repositoryCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder + subBuilder = null; + if (repositoryCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.Builder + subBuilder = null; + if (repositoryCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 4; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder + .class); + } + + public interface AptRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. Type of archive files in this repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for archiveType. + */ + int getArchiveTypeValue(); + /** + * + * + *
+         * Required. Type of archive files in this repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The archiveType. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .ArchiveType + getArchiveType(); + + /** + * + * + *
+         * Required. URI for this repository.
+         * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+         * Required. URI for this repository.
+         * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+         * Required. Distribution of this repository.
+         * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The distribution. + */ + java.lang.String getDistribution(); + /** + * + * + *
+         * Required. Distribution of this repository.
+         * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for distribution. + */ + com.google.protobuf.ByteString getDistributionBytes(); + + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the components. + */ + java.util.List getComponentsList(); + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of components. + */ + int getComponentsCount(); + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + java.lang.String getComponents(int index); + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + com.google.protobuf.ByteString getComponentsBytes(int index); + + /** + * + * + *
+         * URI of the key file for this repository. The agent maintains a
+         * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+         * 
+ * + * string gpg_key = 5; + * + * @return The gpgKey. + */ + java.lang.String getGpgKey(); + /** + * + * + *
+         * URI of the key file for this repository. The agent maintains a
+         * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+         * 
+ * + * string gpg_key = 5; + * + * @return The bytes for gpgKey. + */ + com.google.protobuf.ByteString getGpgKeyBytes(); + } + /** + * + * + *
+       * Represents a single apt package repository. These will be added to
+       * a repo file that will be managed at
+       * `/etc/apt/sources.list.d/google_osconfig.list`.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} + */ + public static final class AptRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + AptRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use AptRepository.newBuilder() to construct. + private AptRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AptRepository() { + archiveType_ = 0; + uri_ = ""; + distribution_ = ""; + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + gpgKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AptRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AptRepository( + 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(); + + archiveType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + distribution_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + components_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + components_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + gpgKey_ = 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)) { + components_ = components_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.Builder.class); + } + + /** + * + * + *
+         * Type of archive.
+         * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType} + */ + public enum ArchiveType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Unspecified is invalid.
+           * 
+ * + * ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + ARCHIVE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+           * Deb indicates that the archive contains binary files.
+           * 
+ * + * DEB = 1; + */ + DEB(1), + /** + * + * + *
+           * Deb-src indicates that the archive contains source files.
+           * 
+ * + * DEB_SRC = 2; + */ + DEB_SRC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+           * Unspecified is invalid.
+           * 
+ * + * ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + public static final int ARCHIVE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * Deb indicates that the archive contains binary files.
+           * 
+ * + * DEB = 1; + */ + public static final int DEB_VALUE = 1; + /** + * + * + *
+           * Deb-src indicates that the archive contains source files.
+           * 
+ * + * DEB_SRC = 2; + */ + public static final int DEB_SRC_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 ArchiveType 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 ArchiveType forNumber(int value) { + switch (value) { + case 0: + return ARCHIVE_TYPE_UNSPECIFIED; + case 1: + return DEB; + case 2: + return DEB_SRC; + 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 ArchiveType findValueByNumber(int number) { + return ArchiveType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ArchiveType[] VALUES = values(); + + public static ArchiveType 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 ArchiveType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType) + } + + public static final int ARCHIVE_TYPE_FIELD_NUMBER = 1; + private int archiveType_; + /** + * + * + *
+         * Required. Type of archive files in this repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for archiveType. + */ + @java.lang.Override + public int getArchiveTypeValue() { + return archiveType_; + } + /** + * + * + *
+         * Required. Type of archive files in this repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The archiveType. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .ArchiveType + getArchiveType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .ArchiveType + result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.ArchiveType.valueOf(archiveType_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .ArchiveType.UNRECOGNIZED + : result; + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+         * Required. URI for this repository.
+         * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+         * Required. URI for this repository.
+         * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 3; + private volatile java.lang.Object distribution_; + /** + * + * + *
+         * Required. Distribution of this repository.
+         * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The distribution. + */ + @java.lang.Override + public java.lang.String getDistribution() { + java.lang.Object ref = distribution_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + distribution_ = s; + return s; + } + } + /** + * + * + *
+         * Required. Distribution of this repository.
+         * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for distribution. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDistributionBytes() { + java.lang.Object ref = distribution_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + distribution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPONENTS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList components_; + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_; + } + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+         * Required. List of components for this repository. Must contain at least one
+         * item.
+         * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + + public static final int GPG_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object gpgKey_; + /** + * + * + *
+         * URI of the key file for this repository. The agent maintains a
+         * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+         * 
+ * + * string gpg_key = 5; + * + * @return The gpgKey. + */ + @java.lang.Override + public java.lang.String getGpgKey() { + java.lang.Object ref = gpgKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gpgKey_ = s; + return s; + } + } + /** + * + * + *
+         * URI of the key file for this repository. The agent maintains a
+         * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+         * 
+ * + * string gpg_key = 5; + * + * @return The bytes for gpgKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGpgKeyBytes() { + java.lang.Object ref = gpgKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gpgKey_ = 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 (archiveType_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.ArchiveType.ARCHIVE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, archiveType_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getDistributionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, distribution_); + } + for (int i = 0; i < components_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, components_.getRaw(i)); + } + if (!getGpgKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, gpgKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (archiveType_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.ArchiveType.ARCHIVE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, archiveType_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getDistributionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, distribution_); + } + { + int dataSize = 0; + for (int i = 0; i < components_.size(); i++) { + dataSize += computeStringSizeNoTag(components_.getRaw(i)); + } + size += dataSize; + size += 1 * getComponentsList().size(); + } + if (!getGpgKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, gpgKey_); + } + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + obj; + + if (archiveType_ != other.archiveType_) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDistribution().equals(other.getDistribution())) return false; + if (!getComponentsList().equals(other.getComponentsList())) return false; + if (!getGpgKey().equals(other.getGpgKey())) 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) + ARCHIVE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + archiveType_; + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistribution().hashCode(); + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (37 * hash) + GPG_KEY_FIELD_NUMBER; + hash = (53 * hash) + getGpgKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + 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 single apt package repository. These will be added to
+         * a repo file that will be managed at
+         * `/etc/apt/sources.list.d/google_osconfig.list`.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.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(); + archiveType_ = 0; + + uri_ = ""; + + distribution_ = ""; + + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + gpgKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository(this); + int from_bitField0_ = bitField0_; + result.archiveType_ = archiveType_; + result.uri_ = uri_; + result.distribution_ = distribution_; + if (((bitField0_ & 0x00000001) != 0)) { + components_ = components_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.components_ = components_; + result.gpgKey_ = gpgKey_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance()) return this; + if (other.archiveType_ != 0) { + setArchiveTypeValue(other.getArchiveTypeValue()); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getDistribution().isEmpty()) { + distribution_ = other.distribution_; + onChanged(); + } + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + if (!other.getGpgKey().isEmpty()) { + gpgKey_ = other.gpgKey_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int archiveType_ = 0; + /** + * + * + *
+           * Required. Type of archive files in this repository.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for archiveType. + */ + @java.lang.Override + public int getArchiveTypeValue() { + return archiveType_; + } + /** + * + * + *
+           * Required. Type of archive files in this repository.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for archiveType to set. + * @return This builder for chaining. + */ + public Builder setArchiveTypeValue(int value) { + + archiveType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Type of archive files in this repository.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The archiveType. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.ArchiveType + getArchiveType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .ArchiveType + result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.ArchiveType.valueOf(archiveType_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.ArchiveType.UNRECOGNIZED + : result; + } + /** + * + * + *
+           * Required. Type of archive files in this repository.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The archiveType to set. + * @return This builder for chaining. + */ + public Builder setArchiveType( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .ArchiveType + value) { + if (value == null) { + throw new NullPointerException(); + } + + archiveType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Type of archive files in this repository.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearArchiveType() { + + archiveType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+           * Required. URI for this repository.
+           * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. URI for this repository.
+           * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. URI for this repository.
+           * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. URI for this repository.
+           * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. URI for this repository.
+           * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object distribution_ = ""; + /** + * + * + *
+           * Required. Distribution of this repository.
+           * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The distribution. + */ + public java.lang.String getDistribution() { + java.lang.Object ref = distribution_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + distribution_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. Distribution of this repository.
+           * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for distribution. + */ + public com.google.protobuf.ByteString getDistributionBytes() { + java.lang.Object ref = distribution_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + distribution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. Distribution of this repository.
+           * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The distribution to set. + * @return This builder for chaining. + */ + public Builder setDistribution(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + distribution_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Distribution of this repository.
+           * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDistribution() { + + distribution_ = getDefaultInstance().getDistribution(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. Distribution of this repository.
+           * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for distribution to set. + * @return This builder for chaining. + */ + public Builder setDistributionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + distribution_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList components_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + components_ = new com.google.protobuf.LazyStringArrayList(components_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_.getUnmodifiableView(); + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The components to set. + * @return This builder for chaining. + */ + public Builder setComponents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The components to add. + * @return This builder for chaining. + */ + public Builder addComponents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The components to add. + * @return This builder for chaining. + */ + public Builder addAllComponents(java.lang.Iterable values) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, components_); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearComponents() { + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. List of components for this repository. Must contain at least one
+           * item.
+           * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the components to add. + * @return This builder for chaining. + */ + public Builder addComponentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + return this; + } + + private java.lang.Object gpgKey_ = ""; + /** + * + * + *
+           * URI of the key file for this repository. The agent maintains a
+           * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+           * 
+ * + * string gpg_key = 5; + * + * @return The gpgKey. + */ + public java.lang.String getGpgKey() { + java.lang.Object ref = gpgKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gpgKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * URI of the key file for this repository. The agent maintains a
+           * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+           * 
+ * + * string gpg_key = 5; + * + * @return The bytes for gpgKey. + */ + public com.google.protobuf.ByteString getGpgKeyBytes() { + java.lang.Object ref = gpgKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gpgKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * URI of the key file for this repository. The agent maintains a
+           * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+           * 
+ * + * string gpg_key = 5; + * + * @param value The gpgKey to set. + * @return This builder for chaining. + */ + public Builder setGpgKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gpgKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * URI of the key file for this repository. The agent maintains a
+           * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+           * 
+ * + * string gpg_key = 5; + * + * @return This builder for chaining. + */ + public Builder clearGpgKey() { + + gpgKey_ = getDefaultInstance().getGpgKey(); + onChanged(); + return this; + } + /** + * + * + *
+           * URI of the key file for this repository. The agent maintains a
+           * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
+           * 
+ * + * string gpg_key = 5; + * + * @param value The bytes for gpgKey to set. + * @return This builder for chaining. + */ + public Builder setGpgKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gpgKey_ = 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.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AptRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AptRepository(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.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YumRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is  the `repo
+         * id` in the yum config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for resource conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is  the `repo
+         * id` in the yum config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for resource conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + java.lang.String getBaseUrl(); + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + com.google.protobuf.ByteString getBaseUrlBytes(); + + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + java.util.List getGpgKeysList(); + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + int getGpgKeysCount(); + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + java.lang.String getGpgKeys(int index); + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + com.google.protobuf.ByteString getGpgKeysBytes(int index); + } + /** + * + * + *
+       * Represents a single yum package repository. These are added to a
+       * repo file that is managed at
+       * `/etc/yum.repos.d/google_osconfig.repo`.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} + */ + public static final class YumRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + YumRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use YumRepository.newBuilder() to construct. + private YumRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YumRepository() { + id_ = ""; + displayName_ = ""; + baseUrl_ = ""; + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YumRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private YumRepository( + 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(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseUrl_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + gpgKeys_.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)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is  the `repo
+         * id` in the yum config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for resource conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is  the `repo
+         * id` in the yum config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for resource conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_URL_FIELD_NUMBER = 3; + private volatile java.lang.Object baseUrl_; + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + @java.lang.Override + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPG_KEYS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList gpgKeys_; + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_; + } + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseUrl_); + } + for (int i = 0; i < gpgKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, gpgKeys_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseUrl_); + } + { + int dataSize = 0; + for (int i = 0; i < gpgKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(gpgKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getGpgKeysList().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.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getBaseUrl().equals(other.getBaseUrl())) return false; + if (!getGpgKeysList().equals(other.getGpgKeysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + BASE_URL_FIELD_NUMBER; + hash = (53 * hash) + getBaseUrl().hashCode(); + if (getGpgKeysCount() > 0) { + hash = (37 * hash) + GPG_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getGpgKeysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + 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 single yum package repository. These are added to a
+         * repo file that is managed at
+         * `/etc/yum.repos.d/google_osconfig.repo`.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository.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(); + id_ = ""; + + displayName_ = ""; + + baseUrl_ = ""; + + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.displayName_ = displayName_; + result.baseUrl_ = baseUrl_; + if (((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.gpgKeys_ = gpgKeys_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getBaseUrl().isEmpty()) { + baseUrl_ = other.baseUrl_; + onChanged(); + } + if (!other.gpgKeys_.isEmpty()) { + if (gpgKeys_.isEmpty()) { + gpgKeys_ = other.gpgKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGpgKeysIsMutable(); + gpgKeys_.addAll(other.gpgKeys_); + } + 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.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is  the `repo
+           * id` in the yum config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for resource conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is  the `repo
+           * id` in the yum config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for resource conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is  the `repo
+           * id` in the yum config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for resource conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is  the `repo
+           * id` in the yum config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for resource conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is  the `repo
+           * id` in the yum config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for resource conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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; + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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 baseUrl_ = ""; + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBaseUrl() { + + baseUrl_ = getDefaultInstance().getBaseUrl(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList gpgKeys_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureGpgKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(gpgKeys_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_.getUnmodifiableView(); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.getByteString(index); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index to set the value at. + * @param value The gpgKeys to set. + * @return This builder for chaining. + */ + public Builder setGpgKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param values The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addAllGpgKeys(java.lang.Iterable values) { + ensureGpgKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gpgKeys_); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @return This builder for chaining. + */ + public Builder clearGpgKeys() { + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The bytes of the gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGpgKeysIsMutable(); + gpgKeys_.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.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YumRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new YumRepository(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.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ZypperRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is the `repo
+         * id` in the zypper config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for GuestPolicy conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is the `repo
+         * id` in the zypper config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for GuestPolicy conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + java.lang.String getBaseUrl(); + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + com.google.protobuf.ByteString getBaseUrlBytes(); + + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + java.util.List getGpgKeysList(); + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + int getGpgKeysCount(); + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + java.lang.String getGpgKeys(int index); + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + com.google.protobuf.ByteString getGpgKeysBytes(int index); + } + /** + * + * + *
+       * Represents a single zypper package repository. These are added to a
+       * repo file that is managed at
+       * `/etc/zypp/repos.d/google_osconfig.repo`.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} + */ + public static final class ZypperRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) + ZypperRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZypperRepository.newBuilder() to construct. + private ZypperRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZypperRepository() { + id_ = ""; + displayName_ = ""; + baseUrl_ = ""; + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZypperRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ZypperRepository( + 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(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseUrl_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + gpgKeys_.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)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is the `repo
+         * id` in the zypper config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for GuestPolicy conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+         * Required. A one word, unique name for this repository. This is the `repo
+         * id` in the zypper config file and also the `display_name` if
+         * `display_name` is omitted. This id is also used as the unique
+         * identifier when checking for GuestPolicy conflicts.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+         * The display name of the repository.
+         * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_URL_FIELD_NUMBER = 3; + private volatile java.lang.Object baseUrl_; + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + @java.lang.Override + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The location of the repository directory.
+         * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPG_KEYS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList gpgKeys_; + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_; + } + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+         * URIs of GPG keys.
+         * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseUrl_); + } + for (int i = 0; i < gpgKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, gpgKeys_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseUrl_); + } + { + int dataSize = 0; + for (int i = 0; i < gpgKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(gpgKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getGpgKeysList().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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getBaseUrl().equals(other.getBaseUrl())) return false; + if (!getGpgKeysList().equals(other.getGpgKeysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + BASE_URL_FIELD_NUMBER; + hash = (53 * hash) + getBaseUrl().hashCode(); + if (getGpgKeysCount() > 0) { + hash = (37 * hash) + GPG_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getGpgKeysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + 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 single zypper package repository. These are added to a
+         * repo file that is managed at
+         * `/etc/zypp/repos.d/google_osconfig.repo`.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository.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(); + id_ = ""; + + displayName_ = ""; + + baseUrl_ = ""; + + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.displayName_ = displayName_; + result.baseUrl_ = baseUrl_; + if (((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.gpgKeys_ = gpgKeys_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getBaseUrl().isEmpty()) { + baseUrl_ = other.baseUrl_; + onChanged(); + } + if (!other.gpgKeys_.isEmpty()) { + if (gpgKeys_.isEmpty()) { + gpgKeys_ = other.gpgKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGpgKeysIsMutable(); + gpgKeys_.addAll(other.gpgKeys_); + } + 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.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is the `repo
+           * id` in the zypper config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for GuestPolicy conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is the `repo
+           * id` in the zypper config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for GuestPolicy conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is the `repo
+           * id` in the zypper config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for GuestPolicy conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is the `repo
+           * id` in the zypper config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for GuestPolicy conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. A one word, unique name for this repository. This is the `repo
+           * id` in the zypper config file and also the `display_name` if
+           * `display_name` is omitted. This id is also used as the unique
+           * identifier when checking for GuestPolicy conflicts.
+           * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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; + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+           * The display name of the repository.
+           * 
+ * + * string display_name = 2; + * + * @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 baseUrl_ = ""; + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBaseUrl() { + + baseUrl_ = getDefaultInstance().getBaseUrl(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The location of the repository directory.
+           * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList gpgKeys_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureGpgKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(gpgKeys_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_.getUnmodifiableView(); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.getByteString(index); + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index to set the value at. + * @param value The gpgKeys to set. + * @return This builder for chaining. + */ + public Builder setGpgKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param values The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addAllGpgKeys(java.lang.Iterable values) { + ensureGpgKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gpgKeys_); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @return This builder for chaining. + */ + public Builder clearGpgKeys() { + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * URIs of GPG keys.
+           * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The bytes of the gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGpgKeysIsMutable(); + gpgKeys_.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.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZypperRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ZypperRepository(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.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GooRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The name of the repository.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+         * Required. The name of the repository.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+         * Required. The url of the repository.
+         * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + java.lang.String getUrl(); + /** + * + * + *
+         * Required. The url of the repository.
+         * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); + } + /** + * + * + *
+       * Represents a Goo package repository. These are added to a repo file
+       * that is managed at
+       * `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} + */ + public static final class GooRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + GooRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use GooRepository.newBuilder() to construct. + private GooRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GooRepository() { + name_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GooRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GooRepository( + 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(); + + url_ = 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+         * Required. The name of the repository.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The name of the repository.
+         * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + private volatile java.lang.Object url_; + /** + * + * + *
+         * Required. The url of the repository.
+         * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The url of the repository.
+         * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = 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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + 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 (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + obj; + + if (!getName().equals(other.getName())) return false; + if (!getUrl().equals(other.getUrl())) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + 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.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + 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 Goo package repository. These are added to a repo file
+         * that is managed at
+         * `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository.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_ = ""; + + url_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository(this); + result.name_ = name_; + result.url_ = url_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+           * Required. The name of the repository.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The name of the repository.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The name of the repository.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The name of the repository.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The name of the repository.
+           * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * + * + *
+           * Required. The url of the repository.
+           * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The url of the repository.
+           * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The url of the repository.
+           * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The url of the repository.
+           * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The url of the repository.
+           * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = 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.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GooRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GooRepository(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.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int repositoryCase_ = 0; + private java.lang.Object repository_; + + public enum RepositoryCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + APT(1), + YUM(2), + ZYPPER(3), + GOO(4), + REPOSITORY_NOT_SET(0); + private final int value; + + private RepositoryCase(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 RepositoryCase valueOf(int value) { + return forNumber(value); + } + + public static RepositoryCase forNumber(int value) { + switch (value) { + case 1: + return APT; + case 2: + return YUM; + case 3: + return ZYPPER; + case 4: + return GOO; + case 0: + return REPOSITORY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RepositoryCase getRepositoryCase() { + return RepositoryCase.forNumber(repositoryCase_); + } + + public static final int APT_FIELD_NUMBER = 1; + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return repositoryCase_ == 1; + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + getApt() { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .getDefaultInstance(); + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepositoryOrBuilder + getAptOrBuilder() { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .getDefaultInstance(); + } + + public static final int YUM_FIELD_NUMBER = 2; + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return repositoryCase_ == 2; + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + getYum() { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + .getDefaultInstance(); + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepositoryOrBuilder + getYumOrBuilder() { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + .getDefaultInstance(); + } + + public static final int ZYPPER_FIELD_NUMBER = 3; + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return repositoryCase_ == 3; + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + getZypper() { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder + getZypperOrBuilder() { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } + + public static final int GOO_FIELD_NUMBER = 4; + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + * + * @return Whether the goo field is set. + */ + @java.lang.Override + public boolean hasGoo() { + return repositoryCase_ == 4; + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + * + * @return The goo. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + getGoo() { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + .getDefaultInstance(); + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepositoryOrBuilder + getGooOrBuilder() { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (repositoryCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository) + repository_); + } + if (repositoryCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository) + repository_); + } + if (repositoryCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_); + } + if (repositoryCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository) + repository_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repositoryCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_); + } + if (repositoryCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_); + } + if (repositoryCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_); + } + if (repositoryCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_); + } + 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.v1alpha.OSPolicy.Resource.RepositoryResource)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) obj; + + if (!getRepositoryCase().equals(other.getRepositoryCase())) return false; + switch (repositoryCase_) { + case 1: + if (!getApt().equals(other.getApt())) return false; + break; + case 2: + if (!getYum().equals(other.getYum())) return false; + break; + case 3: + if (!getZypper().equals(other.getZypper())) return false; + break; + case 4: + if (!getGoo().equals(other.getGoo())) 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 (repositoryCase_) { + case 1: + hash = (37 * hash) + APT_FIELD_NUMBER; + hash = (53 * hash) + getApt().hashCode(); + break; + case 2: + hash = (37 * hash) + YUM_FIELD_NUMBER; + hash = (53 * hash) + getYum().hashCode(); + break; + case 3: + hash = (37 * hash) + ZYPPER_FIELD_NUMBER; + hash = (53 * hash) + getZypper().hashCode(); + break; + case 4: + hash = (37 * hash) + GOO_FIELD_NUMBER; + hash = (53 * hash) + getGoo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + 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.v1alpha.OSPolicy.Resource.RepositoryResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + 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.v1alpha.OSPolicy.Resource.RepositoryResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + 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.v1alpha.OSPolicy.Resource.RepositoryResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + 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.v1alpha.OSPolicy.Resource.RepositoryResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + 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.v1alpha.OSPolicy.Resource.RepositoryResource 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 resource that manages a package repository.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.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(); + repositoryCase_ = 0; + repository_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(this); + if (repositoryCase_ == 1) { + if (aptBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = aptBuilder_.build(); + } + } + if (repositoryCase_ == 2) { + if (yumBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = yumBuilder_.build(); + } + } + if (repositoryCase_ == 3) { + if (zypperBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = zypperBuilder_.build(); + } + } + if (repositoryCase_ == 4) { + if (gooBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = gooBuilder_.build(); + } + } + result.repositoryCase_ = repositoryCase_; + 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.v1alpha.OSPolicy.Resource.RepositoryResource) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance()) return this; + switch (other.getRepositoryCase()) { + case APT: + { + mergeApt(other.getApt()); + break; + } + case YUM: + { + mergeYum(other.getYum()); + break; + } + case ZYPPER: + { + mergeZypper(other.getZypper()); + break; + } + case GOO: + { + mergeGoo(other.getGoo()); + break; + } + case REPOSITORY_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.v1alpha.OSPolicy.Resource.RepositoryResource parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int repositoryCase_ = 0; + private java.lang.Object repository_; + + public RepositoryCase getRepositoryCase() { + return RepositoryCase.forNumber(repositoryCase_); + } + + public Builder clearRepository() { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepositoryOrBuilder> + aptBuilder_; + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return repositoryCase_ == 1; + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + getApt() { + if (aptBuilder_ == null) { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 1) { + return aptBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + public Builder setApt( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + value) { + if (aptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + aptBuilder_.setMessage(value); + } + repositoryCase_ = 1; + return this; + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + public Builder setApt( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .Builder + builderForValue) { + if (aptBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + aptBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 1; + return this; + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + public Builder mergeApt( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + value) { + if (aptBuilder_ == null) { + if (repositoryCase_ == 1 + && repository_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 1) { + aptBuilder_.mergeFrom(value); + } + aptBuilder_.setMessage(value); + } + repositoryCase_ = 1; + return this; + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + public Builder clearApt() { + if (aptBuilder_ == null) { + if (repositoryCase_ == 1) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 1) { + repositoryCase_ = 0; + repository_ = null; + } + aptBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .Builder + getAptBuilder() { + return getAptFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepositoryOrBuilder + getAptOrBuilder() { + if ((repositoryCase_ == 1) && (aptBuilder_ != null)) { + return aptBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * An Apt Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.AptRepository + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepositoryOrBuilder> + getAptFieldBuilder() { + if (aptBuilder_ == null) { + if (!(repositoryCase_ == 1)) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.getDefaultInstance(); + } + aptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .AptRepository) + repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 1; + onChanged(); + ; + return aptBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepositoryOrBuilder> + yumBuilder_; + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return repositoryCase_ == 2; + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + getYum() { + if (yumBuilder_ == null) { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 2) { + return yumBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + public Builder setYum( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + value) { + if (yumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + yumBuilder_.setMessage(value); + } + repositoryCase_ = 2; + return this; + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + public Builder setYum( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + .Builder + builderForValue) { + if (yumBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + yumBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 2; + return this; + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + public Builder mergeYum( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + value) { + if (yumBuilder_ == null) { + if (repositoryCase_ == 2 + && repository_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 2) { + yumBuilder_.mergeFrom(value); + } + yumBuilder_.setMessage(value); + } + repositoryCase_ = 2; + return this; + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + public Builder clearYum() { + if (yumBuilder_ == null) { + if (repositoryCase_ == 2) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 2) { + repositoryCase_ = 0; + repository_ = null; + } + yumBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + .Builder + getYumBuilder() { + return getYumFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepositoryOrBuilder + getYumOrBuilder() { + if ((repositoryCase_ == 2) && (yumBuilder_ != null)) { + return yumBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * A Yum Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.YumRepository + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepositoryOrBuilder> + getYumFieldBuilder() { + if (yumBuilder_ == null) { + if (!(repositoryCase_ == 2)) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.getDefaultInstance(); + } + yumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .YumRepository) + repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 2; + onChanged(); + ; + return yumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder> + zypperBuilder_; + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return repositoryCase_ == 3; + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository + getZypper() { + if (zypperBuilder_ == null) { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 3) { + return zypperBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + public Builder setZypper( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + value) { + if (zypperBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + zypperBuilder_.setMessage(value); + } + repositoryCase_ = 3; + return this; + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + public Builder setZypper( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + .Builder + builderForValue) { + if (zypperBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + zypperBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 3; + return this; + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + public Builder mergeZypper( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository + value) { + if (zypperBuilder_ == null) { + if (repositoryCase_ == 3 + && repository_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 3) { + zypperBuilder_.mergeFrom(value); + } + zypperBuilder_.setMessage(value); + } + repositoryCase_ = 3; + return this; + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + public Builder clearZypper() { + if (zypperBuilder_ == null) { + if (repositoryCase_ == 3) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 3) { + repositoryCase_ = 0; + repository_ = null; + } + zypperBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder + getZypperBuilder() { + return getZypperFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder + getZypperOrBuilder() { + if ((repositoryCase_ == 3) && (zypperBuilder_ != null)) { + return zypperBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * A Zypper Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder> + getZypperFieldBuilder() { + if (zypperBuilder_ == null) { + if (!(repositoryCase_ == 3)) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.getDefaultInstance(); + } + zypperBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .ZypperRepository) + repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 3; + onChanged(); + ; + return zypperBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepositoryOrBuilder> + gooBuilder_; + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + * + * @return Whether the goo field is set. + */ + @java.lang.Override + public boolean hasGoo() { + return repositoryCase_ == 4; + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + * + * @return The goo. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + getGoo() { + if (gooBuilder_ == null) { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 4) { + return gooBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + public Builder setGoo( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + value) { + if (gooBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + gooBuilder_.setMessage(value); + } + repositoryCase_ = 4; + return this; + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + public Builder setGoo( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + .Builder + builderForValue) { + if (gooBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + gooBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 4; + return this; + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + public Builder mergeGoo( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + value) { + if (gooBuilder_ == null) { + if (repositoryCase_ == 4 + && repository_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 4) { + gooBuilder_.mergeFrom(value); + } + gooBuilder_.setMessage(value); + } + repositoryCase_ = 4; + return this; + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + public Builder clearGoo() { + if (gooBuilder_ == null) { + if (repositoryCase_ == 4) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 4) { + repositoryCase_ = 0; + repository_ = null; + } + gooBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + .Builder + getGooBuilder() { + return getGooFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepositoryOrBuilder + getGooOrBuilder() { + if ((repositoryCase_ == 4) && (gooBuilder_ != null)) { + return gooBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance(); + } + } + /** + * + * + *
+         * A Goo Repository.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.GooRepository + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepositoryOrBuilder> + getGooFieldBuilder() { + if (gooBuilder_ == null) { + if (!(repositoryCase_ == 4)) { + repository_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.getDefaultInstance(); + } + gooBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .GooRepository) + repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 4; + onChanged(); + ; + return gooBuilder_; + } + + @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.v1alpha.OSPolicy.Resource.RepositoryResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepositoryResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RepositoryResource(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.v1alpha.OSPolicy.Resource.RepositoryResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. What to run to validate this resource is in the desired state.
+       * An exit code of 100 indicates "in desired state", and exit code of 101
+       * indicates "not in desired state". Any other exit code indicates a
+       * failure running validate.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the validate field is set. + */ + boolean hasValidate(); + /** + * + * + *
+       * Required. What to run to validate this resource is in the desired state.
+       * An exit code of 100 indicates "in desired state", and exit code of 101
+       * indicates "not in desired state". Any other exit code indicates a
+       * failure running validate.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The validate. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec getValidate(); + /** + * + * + *
+       * Required. What to run to validate this resource is in the desired state.
+       * An exit code of 100 indicates "in desired state", and exit code of 101
+       * indicates "not in desired state". Any other exit code indicates a
+       * failure running validate.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder + getValidateOrBuilder(); + + /** + * + * + *
+       * What to run to bring this resource into the desired state.
+       * An exit code of 100 indicates "success", any other exit code indicates
+       * a failure running enforce.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + * + * @return Whether the enforce field is set. + */ + boolean hasEnforce(); + /** + * + * + *
+       * What to run to bring this resource into the desired state.
+       * An exit code of 100 indicates "success", any other exit code indicates
+       * a failure running enforce.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + * + * @return The enforce. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec getEnforce(); + /** + * + * + *
+       * What to run to bring this resource into the desired state.
+       * An exit code of 100 indicates "success", any other exit code indicates
+       * a failure running enforce.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder + getEnforceOrBuilder(); + } + /** + * + * + *
+     * A resource that allows executing scripts on the VM.
+     * The `ExecResource` has 2 stages: `validate` and `enforce` and both stages
+     * accept a script as an argument to execute.
+     * When the `ExecResource` is applied by the agent, it first executes the
+     * script in the `validate` stage. The `validate` stage can signal that the
+     * `ExecResource` is already in the desired state by returning an exit code
+     * of `100`. If the `ExecResource` is not in the desired state, it should
+     * return an exit code of `101`. Any other exit code returned by this stage
+     * is considered an error.
+     * If the `ExecResource` is not in the desired state based on the exit code
+     * from the `validate` stage, the agent proceeds to execute the script from
+     * the `enforce` stage. If the `ExecResource` is already in the desired
+     * state, the `enforce` stage will not be run.
+     * Similar to `validate` stage, the `enforce` stage should return an exit
+     * code of `100` to indicate that the resource in now in its desired state.
+     * Any other exit code is considered an error.
+     * NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to
+     * have an explicit indicator of `in desired state`, `not in desired state`
+     * and errors. Because, for example, Powershell will always return an exit
+     * code of `0` unless an `exit` statement is provided in the script. So, for
+     * reasons of consistency and being explicit, exit codes `100` and `101`
+     * were chosen.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} + */ + public static final class ExecResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + ExecResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecResource.newBuilder() to construct. + private ExecResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecResource( + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + subBuilder = null; + if (validate_ != null) { + subBuilder = validate_.toBuilder(); + } + validate_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(validate_); + validate_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + subBuilder = null; + if (enforce_ != null) { + subBuilder = enforce_.toBuilder(); + } + enforce_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(enforce_); + enforce_ = 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder.class); + } + + public interface ExecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * A remote or local file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return Whether the file field is set. + */ + boolean hasFile(); + /** + * + * + *
+         * A remote or local file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return The file. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getFile(); + /** + * + * + *
+         * A remote or local file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder getFileOrBuilder(); + + /** + * + * + *
+         * An inline script.
+         * The size of the script is limited to 1024 characters.
+         * 
+ * + * string script = 2; + * + * @return Whether the script field is set. + */ + boolean hasScript(); + /** + * + * + *
+         * An inline script.
+         * The size of the script is limited to 1024 characters.
+         * 
+ * + * string script = 2; + * + * @return The script. + */ + java.lang.String getScript(); + /** + * + * + *
+         * An inline script.
+         * The size of the script is limited to 1024 characters.
+         * 
+ * + * string script = 2; + * + * @return The bytes for script. + */ + com.google.protobuf.ByteString getScriptBytes(); + + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + java.util.List getArgsList(); + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + int getArgsCount(); + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString getArgsBytes(int index); + + /** + * + * + *
+         * Required. The script interpreter to use.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for interpreter. + */ + int getInterpreterValue(); + /** + * + * + *
+         * Required. The script interpreter to use.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interpreter. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + getInterpreter(); + + /** + * + * + *
+         * Only recorded for enforce Exec.
+         * Path to an output file (that is created by this Exec) whose
+         * content will be recorded in OSPolicyResourceCompliance after a
+         * successful run. Absence or failure to read this file will result in
+         * this ExecResource being non-compliant. Output file size is limited to
+         * 100K bytes.
+         * 
+ * + * string output_file_path = 5; + * + * @return The outputFilePath. + */ + java.lang.String getOutputFilePath(); + /** + * + * + *
+         * Only recorded for enforce Exec.
+         * Path to an output file (that is created by this Exec) whose
+         * content will be recorded in OSPolicyResourceCompliance after a
+         * successful run. Absence or failure to read this file will result in
+         * this ExecResource being non-compliant. Output file size is limited to
+         * 100K bytes.
+         * 
+ * + * string output_file_path = 5; + * + * @return The bytes for outputFilePath. + */ + com.google.protobuf.ByteString getOutputFilePathBytes(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.SourceCase + getSourceCase(); + } + /** + * + * + *
+       * A file or script to execute.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} + */ + public static final class Exec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) + ExecOrBuilder { + private static final long serialVersionUID = 0L; + // Use Exec.newBuilder() to construct. + private Exec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Exec() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + interpreter_ = 0; + outputFilePath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Exec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Exec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder subBuilder = + null; + if (sourceCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_) + .toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + args_.add(s); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + interpreter_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputFilePath_ = 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)) { + args_ = args_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + .class); + } + + /** + * + * + *
+         * The interpreter to use.
+         * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter} + */ + public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Defaults to NONE.
+           * 
+ * + * INTERPRETER_UNSPECIFIED = 0; + */ + INTERPRETER_UNSPECIFIED(0), + /** + * + * + *
+           * If no interpreter is specified the
+           * source will be executed directly, which will likely only
+           * succeed for executables and scripts with shebang lines.
+           * [Wikipedia
+           * shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).
+           * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+           * Indicates that the script will be run with /bin/sh on Linux and
+           * cmd.exe on windows.
+           * 
+ * + * SHELL = 2; + */ + SHELL(2), + /** + * + * + *
+           * Indicates that the script will be run with powershell.
+           * 
+ * + * POWERSHELL = 3; + */ + POWERSHELL(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+           * Defaults to NONE.
+           * 
+ * + * INTERPRETER_UNSPECIFIED = 0; + */ + public static final int INTERPRETER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * If no interpreter is specified the
+           * source will be executed directly, which will likely only
+           * succeed for executables and scripts with shebang lines.
+           * [Wikipedia
+           * shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).
+           * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + /** + * + * + *
+           * Indicates that the script will be run with /bin/sh on Linux and
+           * cmd.exe on windows.
+           * 
+ * + * SHELL = 2; + */ + public static final int SHELL_VALUE = 2; + /** + * + * + *
+           * Indicates that the script will be run with powershell.
+           * 
+ * + * POWERSHELL = 3; + */ + public static final int POWERSHELL_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 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 NONE; + case 2: + return SHELL; + case 3: + 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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .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.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter) + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FILE(1), + SCRIPT(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return FILE; + case 2: + return SCRIPT; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int FILE_FIELD_NUMBER = 1; + /** + * + * + *
+         * A remote or local file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return sourceCase_ == 1; + } + /** + * + * + *
+         * A remote or local file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getFile() { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + /** + * + * + *
+         * A remote or local file.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getFileOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + + public static final int SCRIPT_FIELD_NUMBER = 2; + /** + * + * + *
+         * An inline script.
+         * The size of the script is limited to 1024 characters.
+         * 
+ * + * string script = 2; + * + * @return Whether the script field is set. + */ + public boolean hasScript() { + return sourceCase_ == 2; + } + /** + * + * + *
+         * An inline script.
+         * The size of the script is limited to 1024 characters.
+         * 
+ * + * string script = 2; + * + * @return The script. + */ + public java.lang.String getScript() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.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 (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+         * An inline script.
+         * The size of the script is limited to 1024 characters.
+         * 
+ * + * string script = 2; + * + * @return The bytes for script. + */ + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList args_; + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_; + } + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+         * Optional arguments to pass to the source during execution.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int INTERPRETER_FIELD_NUMBER = 4; + private int interpreter_; + /** + * + * + *
+         * Required. The script interpreter to use.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for interpreter. + */ + @java.lang.Override + public int getInterpreterValue() { + return interpreter_; + } + /** + * + * + *
+         * Required. The script interpreter to use.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interpreter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + .valueOf(interpreter_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + .UNRECOGNIZED + : result; + } + + public static final int OUTPUT_FILE_PATH_FIELD_NUMBER = 5; + private volatile java.lang.Object outputFilePath_; + /** + * + * + *
+         * Only recorded for enforce Exec.
+         * Path to an output file (that is created by this Exec) whose
+         * content will be recorded in OSPolicyResourceCompliance after a
+         * successful run. Absence or failure to read this file will result in
+         * this ExecResource being non-compliant. Output file size is limited to
+         * 100K bytes.
+         * 
+ * + * string output_file_path = 5; + * + * @return The outputFilePath. + */ + @java.lang.Override + public java.lang.String getOutputFilePath() { + java.lang.Object ref = outputFilePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputFilePath_ = s; + return s; + } + } + /** + * + * + *
+         * Only recorded for enforce Exec.
+         * Path to an output file (that is created by this Exec) whose
+         * content will be recorded in OSPolicyResourceCompliance after a
+         * successful run. Absence or failure to read this file will result in
+         * this ExecResource being non-compliant. Output file size is limited to
+         * 100K bytes.
+         * 
+ * + * string output_file_path = 5; + * + * @return The bytes for outputFilePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputFilePathBytes() { + java.lang.Object ref = outputFilePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputFilePath_ = 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 (sourceCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_); + } + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); + } + if (interpreter_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + .INTERPRETER_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, interpreter_); + } + if (!getOutputFilePathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, outputFilePath_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + if (interpreter_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + .INTERPRETER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, interpreter_); + } + if (!getOutputFilePathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, outputFilePath_); + } + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) obj; + + if (!getArgsList().equals(other.getArgsList())) return false; + if (interpreter_ != other.interpreter_) return false; + if (!getOutputFilePath().equals(other.getOutputFilePath())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getFile().equals(other.getFile())) return false; + break; + case 2: + if (!getScript().equals(other.getScript())) 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 (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + hash = (37 * hash) + INTERPRETER_FIELD_NUMBER; + hash = (53 * hash) + interpreter_; + hash = (37 * hash) + OUTPUT_FILE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getOutputFilePath().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + break; + case 2: + hash = (37 * hash) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec 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 file or script to execute.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.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(); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + interpreter_ = 0; + + outputFilePath_ = ""; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(this); + int from_bitField0_ = bitField0_; + if (sourceCase_ == 1) { + if (fileBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = fileBuilder_.build(); + } + } + if (sourceCase_ == 2) { + result.source_ = source_; + } + if (((bitField0_ & 0x00000001) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.args_ = args_; + result.interpreter_ = interpreter_; + result.outputFilePath_ = outputFilePath_; + result.sourceCase_ = sourceCase_; + 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.v1alpha.OSPolicy.Resource.ExecResource.Exec) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance()) return this; + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (other.interpreter_ != 0) { + setInterpreterValue(other.getInterpreterValue()); + } + if (!other.getOutputFilePath().isEmpty()) { + outputFilePath_ = other.outputFilePath_; + onChanged(); + } + switch (other.getSourceCase()) { + case FILE: + { + mergeFile(other.getFile()); + break; + } + case SCRIPT: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_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.v1alpha.OSPolicy.Resource.ExecResource.Exec parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + fileBuilder_; + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return sourceCase_ == 1; + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getFile() { + if (fileBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return fileBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder setFile(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (fileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + fileBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder setFile( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder builderForValue) { + if (fileBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + fileBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder mergeFile(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (fileBuilder_ == null) { + if (sourceCase_ == 1 + && source_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + .getDefaultInstance()) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + fileBuilder_.mergeFrom(value); + } + fileBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder clearFile() { + if (fileBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + fileBuilder_.clear(); + } + return this; + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder getFileBuilder() { + return getFileFieldBuilder().getBuilder(); + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getFileOrBuilder() { + if ((sourceCase_ == 1) && (fileBuilder_ != null)) { + return fileBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + } + /** + * + * + *
+           * A remote or local file.
+           * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + getFileFieldBuilder() { + if (fileBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + fileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged(); + ; + return fileBuilder_; + } + + /** + * + * + *
+           * An inline script.
+           * The size of the script is limited to 1024 characters.
+           * 
+ * + * string script = 2; + * + * @return Whether the script field is set. + */ + @java.lang.Override + public boolean hasScript() { + return sourceCase_ == 2; + } + /** + * + * + *
+           * An inline script.
+           * The size of the script is limited to 1024 characters.
+           * 
+ * + * string script = 2; + * + * @return The script. + */ + @java.lang.Override + public java.lang.String getScript() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * An inline script.
+           * The size of the script is limited to 1024 characters.
+           * 
+ * + * string script = 2; + * + * @return The bytes for script. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * An inline script.
+           * The size of the script is limited to 1024 characters.
+           * 
+ * + * string script = 2; + * + * @param value The script to set. + * @return This builder for chaining. + */ + public Builder setScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * An inline script.
+           * The size of the script is limited to 1024 characters.
+           * 
+ * + * string script = 2; + * + * @return This builder for chaining. + */ + public Builder clearScript() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+           * An inline script.
+           * The size of the script is limited to 1024 characters.
+           * 
+ * + * string script = 2; + * + * @param value The bytes for script to set. + * @return This builder for chaining. + */ + public Builder setScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs(java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + return this; + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Optional arguments to pass to the source during execution.
+           * 
+ * + * repeated string args = 3; + * + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private int interpreter_ = 0; + /** + * + * + *
+           * Required. The script interpreter to use.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for interpreter. + */ + @java.lang.Override + public int getInterpreterValue() { + return interpreter_; + } + /** + * + * + *
+           * Required. The script interpreter to use.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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; + } + /** + * + * + *
+           * Required. The script interpreter to use.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interpreter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .Interpreter.valueOf(interpreter_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + .UNRECOGNIZED + : result; + } + /** + * + * + *
+           * Required. The script interpreter to use.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreter( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter + value) { + if (value == null) { + throw new NullPointerException(); + } + + interpreter_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The script interpreter to use.
+           * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearInterpreter() { + + interpreter_ = 0; + onChanged(); + return this; + } + + private java.lang.Object outputFilePath_ = ""; + /** + * + * + *
+           * Only recorded for enforce Exec.
+           * Path to an output file (that is created by this Exec) whose
+           * content will be recorded in OSPolicyResourceCompliance after a
+           * successful run. Absence or failure to read this file will result in
+           * this ExecResource being non-compliant. Output file size is limited to
+           * 100K bytes.
+           * 
+ * + * string output_file_path = 5; + * + * @return The outputFilePath. + */ + public java.lang.String getOutputFilePath() { + java.lang.Object ref = outputFilePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputFilePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Only recorded for enforce Exec.
+           * Path to an output file (that is created by this Exec) whose
+           * content will be recorded in OSPolicyResourceCompliance after a
+           * successful run. Absence or failure to read this file will result in
+           * this ExecResource being non-compliant. Output file size is limited to
+           * 100K bytes.
+           * 
+ * + * string output_file_path = 5; + * + * @return The bytes for outputFilePath. + */ + public com.google.protobuf.ByteString getOutputFilePathBytes() { + java.lang.Object ref = outputFilePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputFilePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Only recorded for enforce Exec.
+           * Path to an output file (that is created by this Exec) whose
+           * content will be recorded in OSPolicyResourceCompliance after a
+           * successful run. Absence or failure to read this file will result in
+           * this ExecResource being non-compliant. Output file size is limited to
+           * 100K bytes.
+           * 
+ * + * string output_file_path = 5; + * + * @param value The outputFilePath to set. + * @return This builder for chaining. + */ + public Builder setOutputFilePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputFilePath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Only recorded for enforce Exec.
+           * Path to an output file (that is created by this Exec) whose
+           * content will be recorded in OSPolicyResourceCompliance after a
+           * successful run. Absence or failure to read this file will result in
+           * this ExecResource being non-compliant. Output file size is limited to
+           * 100K bytes.
+           * 
+ * + * string output_file_path = 5; + * + * @return This builder for chaining. + */ + public Builder clearOutputFilePath() { + + outputFilePath_ = getDefaultInstance().getOutputFilePath(); + onChanged(); + return this; + } + /** + * + * + *
+           * Only recorded for enforce Exec.
+           * Path to an output file (that is created by this Exec) whose
+           * content will be recorded in OSPolicyResourceCompliance after a
+           * successful run. Absence or failure to read this file will result in
+           * this ExecResource being non-compliant. Output file size is limited to
+           * 100K bytes.
+           * 
+ * + * string output_file_path = 5; + * + * @param value The bytes for outputFilePath to set. + * @return This builder for chaining. + */ + public Builder setOutputFilePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputFilePath_ = 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.v1alpha.OSPolicy.Resource.ExecResource.Exec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Exec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Exec(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.v1alpha.OSPolicy.Resource.ExecResource.Exec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VALIDATE_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate_; + /** + * + * + *
+       * Required. What to run to validate this resource is in the desired state.
+       * An exit code of 100 indicates "in desired state", and exit code of 101
+       * indicates "not in desired state". Any other exit code indicates a
+       * failure running validate.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the validate field is set. + */ + @java.lang.Override + public boolean hasValidate() { + return validate_ != null; + } + /** + * + * + *
+       * Required. What to run to validate this resource is in the desired state.
+       * An exit code of 100 indicates "in desired state", and exit code of 101
+       * indicates "not in desired state". Any other exit code indicates a
+       * failure running validate.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The validate. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec getValidate() { + return validate_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance() + : validate_; + } + /** + * + * + *
+       * Required. What to run to validate this resource is in the desired state.
+       * An exit code of 100 indicates "in desired state", and exit code of 101
+       * indicates "not in desired state". Any other exit code indicates a
+       * failure running validate.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder + getValidateOrBuilder() { + return getValidate(); + } + + public static final int ENFORCE_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce_; + /** + * + * + *
+       * What to run to bring this resource into the desired state.
+       * An exit code of 100 indicates "success", any other exit code indicates
+       * a failure running enforce.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + * + * @return Whether the enforce field is set. + */ + @java.lang.Override + public boolean hasEnforce() { + return enforce_ != null; + } + /** + * + * + *
+       * What to run to bring this resource into the desired state.
+       * An exit code of 100 indicates "success", any other exit code indicates
+       * a failure running enforce.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + * + * @return The enforce. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec getEnforce() { + return enforce_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance() + : enforce_; + } + /** + * + * + *
+       * What to run to bring this resource into the desired state.
+       * An exit code of 100 indicates "success", any other exit code indicates
+       * a failure running enforce.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder + getEnforceOrBuilder() { + return getEnforce(); + } + + 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 (validate_ != null) { + output.writeMessage(1, getValidate()); + } + if (enforce_ != null) { + output.writeMessage(2, getEnforce()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (validate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getValidate()); + } + if (enforce_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEnforce()); + } + 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.v1alpha.OSPolicy.Resource.ExecResource)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) obj; + + if (hasValidate() != other.hasValidate()) return false; + if (hasValidate()) { + if (!getValidate().equals(other.getValidate())) return false; + } + if (hasEnforce() != other.hasEnforce()) return false; + if (hasEnforce()) { + if (!getEnforce().equals(other.getEnforce())) 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 (hasValidate()) { + hash = (37 * hash) + VALIDATE_FIELD_NUMBER; + hash = (53 * hash) + getValidate().hashCode(); + } + if (hasEnforce()) { + hash = (37 * hash) + ENFORCE_FIELD_NUMBER; + hash = (53 * hash) + getEnforce().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource 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.v1alpha.OSPolicy.Resource.ExecResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource 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.v1alpha.OSPolicy.Resource.ExecResource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource 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.v1alpha.OSPolicy.Resource.ExecResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + 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.v1alpha.OSPolicy.Resource.ExecResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource 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.v1alpha.OSPolicy.Resource.ExecResource 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 resource that allows executing scripts on the VM.
+       * The `ExecResource` has 2 stages: `validate` and `enforce` and both stages
+       * accept a script as an argument to execute.
+       * When the `ExecResource` is applied by the agent, it first executes the
+       * script in the `validate` stage. The `validate` stage can signal that the
+       * `ExecResource` is already in the desired state by returning an exit code
+       * of `100`. If the `ExecResource` is not in the desired state, it should
+       * return an exit code of `101`. Any other exit code returned by this stage
+       * is considered an error.
+       * If the `ExecResource` is not in the desired state based on the exit code
+       * from the `validate` stage, the agent proceeds to execute the script from
+       * the `enforce` stage. If the `ExecResource` is already in the desired
+       * state, the `enforce` stage will not be run.
+       * Similar to `validate` stage, the `enforce` stage should return an exit
+       * code of `100` to indicate that the resource in now in its desired state.
+       * Any other exit code is considered an error.
+       * NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to
+       * have an explicit indicator of `in desired state`, `not in desired state`
+       * and errors. Because, for example, Powershell will always return an exit
+       * code of `0` unless an `exit` statement is provided in the script. So, for
+       * reasons of consistency and being explicit, exit codes `100` and `101`
+       * were chosen.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.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 (validateBuilder_ == null) { + validate_ = null; + } else { + validate_ = null; + validateBuilder_ = null; + } + if (enforceBuilder_ == null) { + enforce_ = null; + } else { + enforce_ = null; + enforceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(this); + if (validateBuilder_ == null) { + result.validate_ = validate_; + } else { + result.validate_ = validateBuilder_.build(); + } + if (enforceBuilder_ == null) { + result.enforce_ = enforce_; + } else { + result.enforce_ = enforceBuilder_.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.v1alpha.OSPolicy.Resource.ExecResource) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance()) return this; + if (other.hasValidate()) { + mergeValidate(other.getValidate()); + } + if (other.hasEnforce()) { + mergeEnforce(other.getEnforce()); + } + 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.v1alpha.OSPolicy.Resource.ExecResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder> + validateBuilder_; + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the validate field is set. + */ + public boolean hasValidate() { + return validateBuilder_ != null || validate_ != null; + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The validate. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec getValidate() { + if (validateBuilder_ == null) { + return validate_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance() + : validate_; + } else { + return validateBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setValidate( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec value) { + if (validateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + validate_ = value; + onChanged(); + } else { + validateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setValidate( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + builderForValue) { + if (validateBuilder_ == null) { + validate_ = builderForValue.build(); + onChanged(); + } else { + validateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeValidate( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec value) { + if (validateBuilder_ == null) { + if (validate_ != null) { + validate_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.newBuilder( + validate_) + .mergeFrom(value) + .buildPartial(); + } else { + validate_ = value; + } + onChanged(); + } else { + validateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearValidate() { + if (validateBuilder_ == null) { + validate_ = null; + onChanged(); + } else { + validate_ = null; + validateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + getValidateBuilder() { + + onChanged(); + return getValidateFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder + getValidateOrBuilder() { + if (validateBuilder_ != null) { + return validateBuilder_.getMessageOrBuilder(); + } else { + return validate_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance() + : validate_; + } + } + /** + * + * + *
+         * Required. What to run to validate this resource is in the desired state.
+         * An exit code of 100 indicates "in desired state", and exit code of 101
+         * indicates "not in desired state". Any other exit code indicates a
+         * failure running validate.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder> + getValidateFieldBuilder() { + if (validateBuilder_ == null) { + validateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder>( + getValidate(), getParentForChildren(), isClean()); + validate_ = null; + } + return validateBuilder_; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder> + enforceBuilder_; + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + * + * @return Whether the enforce field is set. + */ + public boolean hasEnforce() { + return enforceBuilder_ != null || enforce_ != null; + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + * + * @return The enforce. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec getEnforce() { + if (enforceBuilder_ == null) { + return enforce_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance() + : enforce_; + } else { + return enforceBuilder_.getMessage(); + } + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + public Builder setEnforce( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec value) { + if (enforceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforce_ = value; + onChanged(); + } else { + enforceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + public Builder setEnforce( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + builderForValue) { + if (enforceBuilder_ == null) { + enforce_ = builderForValue.build(); + onChanged(); + } else { + enforceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + public Builder mergeEnforce( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec value) { + if (enforceBuilder_ == null) { + if (enforce_ != null) { + enforce_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.newBuilder( + enforce_) + .mergeFrom(value) + .buildPartial(); + } else { + enforce_ = value; + } + onChanged(); + } else { + enforceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + public Builder clearEnforce() { + if (enforceBuilder_ == null) { + enforce_ = null; + onChanged(); + } else { + enforce_ = null; + enforceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder + getEnforceBuilder() { + + onChanged(); + return getEnforceFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder + getEnforceOrBuilder() { + if (enforceBuilder_ != null) { + return enforceBuilder_.getMessageOrBuilder(); + } else { + return enforce_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec + .getDefaultInstance() + : enforce_; + } + } + /** + * + * + *
+         * What to run to bring this resource into the desired state.
+         * An exit code of 100 indicates "success", any other exit code indicates
+         * a failure running enforce.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder> + getEnforceFieldBuilder() { + if (enforceBuilder_ == null) { + enforceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Exec.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.ExecOrBuilder>( + getEnforce(), getParentForChildren(), isClean()); + enforce_ = null; + } + return enforceBuilder_; + } + + @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.v1alpha.OSPolicy.Resource.ExecResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecResource(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.v1alpha.OSPolicy.Resource.ExecResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FileResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * A remote or local source.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return Whether the file field is set. + */ + boolean hasFile(); + /** + * + * + *
+       * A remote or local source.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return The file. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getFile(); + /** + * + * + *
+       * A remote or local source.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder getFileOrBuilder(); + + /** + * + * + *
+       * A a file with this content.
+       * The size of the content is limited to 1024 characters.
+       * 
+ * + * string content = 2; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + /** + * + * + *
+       * A a file with this content.
+       * The size of the content is limited to 1024 characters.
+       * 
+ * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+       * A a file with this content.
+       * The size of the content is limited to 1024 characters.
+       * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+       * Required. The absolute path of the file within the VM.
+       * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+       * Required. The absolute path of the file within the VM.
+       * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+       * Required. Desired state of the file.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+       * Required. Desired state of the file.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState getState(); + + /** + * + * + *
+       * Consists of three octal digits which represent, in
+       * order, the permissions of the owner, group, and other users for the
+       * file (similarly to the numeric mode used in the linux chmod
+       * utility). Each digit represents a three bit number with the 4 bit
+       * corresponding to the read permissions, the 2 bit corresponds to the
+       * write bit, and the one bit corresponds to the execute permission.
+       * Default behavior is 755.
+       * Below are some examples of permissions and their associated values:
+       * read, write, and execute: 7
+       * read and execute: 5
+       * read and write: 6
+       * read only: 4
+       * 
+ * + * string permissions = 5; + * + * @return The permissions. + */ + java.lang.String getPermissions(); + /** + * + * + *
+       * Consists of three octal digits which represent, in
+       * order, the permissions of the owner, group, and other users for the
+       * file (similarly to the numeric mode used in the linux chmod
+       * utility). Each digit represents a three bit number with the 4 bit
+       * corresponding to the read permissions, the 2 bit corresponds to the
+       * write bit, and the one bit corresponds to the execute permission.
+       * Default behavior is 755.
+       * Below are some examples of permissions and their associated values:
+       * read, write, and execute: 7
+       * read and execute: 5
+       * read and write: 6
+       * read only: 4
+       * 
+ * + * string permissions = 5; + * + * @return The bytes for permissions. + */ + com.google.protobuf.ByteString getPermissionsBytes(); + + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.SourceCase + getSourceCase(); + } + /** + * + * + *
+     * A resource that manages the state of a file.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} + */ + public static final class FileResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + FileResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use FileResource.newBuilder() to construct. + private FileResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FileResource() { + path_ = ""; + state_ = 0; + permissions_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FileResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FileResource( + 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.v1alpha.OSPolicy.Resource.File.Builder subBuilder = + null; + if (sourceCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_) + .toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 2; + source_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + permissions_ = 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.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder.class); + } + + /** + * + * + *
+       * Desired state of the file.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState} + */ + public enum DesiredState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Unspecified is invalid.
+         * 
+ * + * DESIRED_STATE_UNSPECIFIED = 0; + */ + DESIRED_STATE_UNSPECIFIED(0), + /** + * + * + *
+         * Ensure file at path is present.
+         * 
+ * + * PRESENT = 1; + */ + PRESENT(1), + /** + * + * + *
+         * Ensure file at path is absent.
+         * 
+ * + * ABSENT = 2; + */ + ABSENT(2), + /** + * + * + *
+         * Ensure the contents of the file at path matches. If the file does
+         * not exist it will be created.
+         * 
+ * + * CONTENTS_MATCH = 3; + */ + CONTENTS_MATCH(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Unspecified is invalid.
+         * 
+ * + * DESIRED_STATE_UNSPECIFIED = 0; + */ + public static final int DESIRED_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Ensure file at path is present.
+         * 
+ * + * PRESENT = 1; + */ + public static final int PRESENT_VALUE = 1; + /** + * + * + *
+         * Ensure file at path is absent.
+         * 
+ * + * ABSENT = 2; + */ + public static final int ABSENT_VALUE = 2; + /** + * + * + *
+         * Ensure the contents of the file at path matches. If the file does
+         * not exist it will be created.
+         * 
+ * + * CONTENTS_MATCH = 3; + */ + public static final int CONTENTS_MATCH_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 DesiredState 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 DesiredState forNumber(int value) { + switch (value) { + case 0: + return DESIRED_STATE_UNSPECIFIED; + case 1: + return PRESENT; + case 2: + return ABSENT; + case 3: + return CONTENTS_MATCH; + 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 DesiredState findValueByNumber(int number) { + return DesiredState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DesiredState[] VALUES = values(); + + public static DesiredState 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 DesiredState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState) + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FILE(1), + CONTENT(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return FILE; + case 2: + return CONTENT; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int FILE_FIELD_NUMBER = 1; + /** + * + * + *
+       * A remote or local source.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return sourceCase_ == 1; + } + /** + * + * + *
+       * A remote or local source.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getFile() { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + /** + * + * + *
+       * A remote or local source.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder getFileOrBuilder() { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + + public static final int CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+       * A a file with this content.
+       * The size of the content is limited to 1024 characters.
+       * 
+ * + * string content = 2; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return sourceCase_ == 2; + } + /** + * + * + *
+       * A a file with this content.
+       * The size of the content is limited to 1024 characters.
+       * 
+ * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.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 (sourceCase_ == 2) { + source_ = s; + } + return s; + } + } + /** + * + * + *
+       * A a file with this content.
+       * The size of the content is limited to 1024 characters.
+       * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object path_; + /** + * + * + *
+       * Required. The absolute path of the file within the VM.
+       * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The absolute path of the file within the VM.
+       * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+       * Required. Desired state of the file.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Required. Desired state of the file.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState.valueOf( + state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + .UNRECOGNIZED + : result; + } + + public static final int PERMISSIONS_FIELD_NUMBER = 5; + private volatile java.lang.Object permissions_; + /** + * + * + *
+       * Consists of three octal digits which represent, in
+       * order, the permissions of the owner, group, and other users for the
+       * file (similarly to the numeric mode used in the linux chmod
+       * utility). Each digit represents a three bit number with the 4 bit
+       * corresponding to the read permissions, the 2 bit corresponds to the
+       * write bit, and the one bit corresponds to the execute permission.
+       * Default behavior is 755.
+       * Below are some examples of permissions and their associated values:
+       * read, write, and execute: 7
+       * read and execute: 5
+       * read and write: 6
+       * read only: 4
+       * 
+ * + * string permissions = 5; + * + * @return The permissions. + */ + @java.lang.Override + public java.lang.String getPermissions() { + java.lang.Object ref = permissions_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permissions_ = s; + return s; + } + } + /** + * + * + *
+       * Consists of three octal digits which represent, in
+       * order, the permissions of the owner, group, and other users for the
+       * file (similarly to the numeric mode used in the linux chmod
+       * utility). Each digit represents a three bit number with the 4 bit
+       * corresponding to the read permissions, the 2 bit corresponds to the
+       * write bit, and the one bit corresponds to the execute permission.
+       * Default behavior is 755.
+       * Below are some examples of permissions and their associated values:
+       * read, write, and execute: 7
+       * read and execute: 5
+       * read and write: 6
+       * read only: 4
+       * 
+ * + * string permissions = 5; + * + * @return The bytes for permissions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPermissionsBytes() { + java.lang.Object ref = permissions_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + permissions_ = 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 (sourceCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_); + } + if (sourceCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + .DESIRED_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (!getPermissionsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, permissions_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_); + } + if (sourceCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + .DESIRED_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!getPermissionsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, permissions_); + } + 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.v1alpha.OSPolicy.Resource.FileResource)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) obj; + + if (!getPath().equals(other.getPath())) return false; + if (state_ != other.state_) return false; + if (!getPermissions().equals(other.getPermissions())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 1: + if (!getFile().equals(other.getFile())) return false; + break; + case 2: + if (!getContent().equals(other.getContent())) 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) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissions().hashCode(); + switch (sourceCase_) { + case 1: + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + break; + case 2: + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource 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.v1alpha.OSPolicy.Resource.FileResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource 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.v1alpha.OSPolicy.Resource.FileResource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource 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.v1alpha.OSPolicy.Resource.FileResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + 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.v1alpha.OSPolicy.Resource.FileResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource 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.v1alpha.OSPolicy.Resource.FileResource 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 resource that manages the state of a file.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.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(); + path_ = ""; + + state_ = 0; + + permissions_ = ""; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(this); + if (sourceCase_ == 1) { + if (fileBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = fileBuilder_.build(); + } + } + if (sourceCase_ == 2) { + result.source_ = source_; + } + result.path_ = path_; + result.state_ = state_; + result.permissions_ = permissions_; + result.sourceCase_ = sourceCase_; + 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.v1alpha.OSPolicy.Resource.FileResource) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getPermissions().isEmpty()) { + permissions_ = other.permissions_; + onChanged(); + } + switch (other.getSourceCase()) { + case FILE: + { + mergeFile(other.getFile()); + break; + } + case CONTENT: + { + sourceCase_ = 2; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_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.v1alpha.OSPolicy.Resource.FileResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + fileBuilder_; + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return sourceCase_ == 1; + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File getFile() { + if (fileBuilder_ == null) { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } else { + if (sourceCase_ == 1) { + return fileBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder setFile(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (fileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + fileBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder setFile( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder builderForValue) { + if (fileBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + fileBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder mergeFile(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File value) { + if (fileBuilder_ == null) { + if (sourceCase_ == 1 + && source_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File + .getDefaultInstance()) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 1) { + fileBuilder_.mergeFrom(value); + } + fileBuilder_.setMessage(value); + } + sourceCase_ = 1; + return this; + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public Builder clearFile() { + if (fileBuilder_ == null) { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 1) { + sourceCase_ = 0; + source_ = null; + } + fileBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder getFileBuilder() { + return getFileFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder + getFileOrBuilder() { + if ((sourceCase_ == 1) && (fileBuilder_ != null)) { + return fileBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 1) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + } + /** + * + * + *
+         * A remote or local source.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder> + getFileFieldBuilder() { + if (fileBuilder_ == null) { + if (!(sourceCase_ == 1)) { + source_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.getDefaultInstance(); + } + fileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.File) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 1; + onChanged(); + ; + return fileBuilder_; + } + + /** + * + * + *
+         * A a file with this content.
+         * The size of the content is limited to 1024 characters.
+         * 
+ * + * string content = 2; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return sourceCase_ == 2; + } + /** + * + * + *
+         * A a file with this content.
+         * The size of the content is limited to 1024 characters.
+         * 
+ * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 2) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * A a file with this content.
+         * The size of the content is limited to 1024 characters.
+         * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 2) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 2) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * A a file with this content.
+         * The size of the content is limited to 1024 characters.
+         * 
+ * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * A a file with this content.
+         * The size of the content is limited to 1024 characters.
+         * 
+ * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+         * A a file with this content.
+         * The size of the content is limited to 1024 characters.
+         * 
+ * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 2; + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+         * Required. The absolute path of the file within the VM.
+         * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The absolute path of the file within the VM.
+         * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for path. + */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The absolute path of the file within the VM.
+         * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The absolute path of the file within the VM.
+         * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The absolute path of the file within the VM.
+         * 
+ * + * string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+         * Required. Desired state of the file.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+         * Required. Desired state of the file.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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; + } + /** + * + * + *
+         * Required. Desired state of the file.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState.valueOf( + state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. Desired state of the file.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Desired state of the file.
+         * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object permissions_ = ""; + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod
+         * utility). Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 5; + * + * @return The permissions. + */ + public java.lang.String getPermissions() { + java.lang.Object ref = permissions_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permissions_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod
+         * utility). Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 5; + * + * @return The bytes for permissions. + */ + public com.google.protobuf.ByteString getPermissionsBytes() { + java.lang.Object ref = permissions_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + permissions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod
+         * utility). Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 5; + * + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + permissions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod
+         * utility). Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 5; + * + * @return This builder for chaining. + */ + public Builder clearPermissions() { + + permissions_ = getDefaultInstance().getPermissions(); + onChanged(); + return this; + } + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod
+         * utility). Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 5; + * + * @param value The bytes for permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + permissions_ = 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.v1alpha.OSPolicy.Resource.FileResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FileResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FileResource(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.v1alpha.OSPolicy.Resource.FileResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resourceTypeCase_ = 0; + private java.lang.Object resourceType_; + + public enum ResourceTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PKG(2), + REPOSITORY(3), + EXEC(4), + FILE(5), + RESOURCETYPE_NOT_SET(0); + private final int value; + + private ResourceTypeCase(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 ResourceTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceTypeCase forNumber(int value) { + switch (value) { + case 2: + return PKG; + case 3: + return REPOSITORY; + case 4: + return EXEC; + case 5: + return FILE; + case 0: + return RESOURCETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceTypeCase getResourceTypeCase() { + return ResourceTypeCase.forNumber(resourceTypeCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+     * Required. The id of the resource with the following restrictions:
+     * * 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 OS policy.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The id of the resource with the following restrictions:
+     * * 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 OS policy.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PKG_FIELD_NUMBER = 2; + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return Whether the pkg field is set. + */ + @java.lang.Override + public boolean hasPkg() { + return resourceTypeCase_ == 2; + } + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return The pkg. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource getPkg() { + if (resourceTypeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } + /** + * + * + *
+     * Package resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder + getPkgOrBuilder() { + if (resourceTypeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } + + public static final int REPOSITORY_FIELD_NUMBER = 3; + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return Whether the repository field is set. + */ + @java.lang.Override + public boolean hasRepository() { + return resourceTypeCase_ == 3; + } + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return The repository. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource getRepository() { + if (resourceTypeCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } + /** + * + * + *
+     * Package repository resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder + getRepositoryOrBuilder() { + if (resourceTypeCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } + + public static final int EXEC_FIELD_NUMBER = 4; + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return Whether the exec field is set. + */ + @java.lang.Override + public boolean hasExec() { + return resourceTypeCase_ == 4; + } + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return The exec. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource getExec() { + if (resourceTypeCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.getDefaultInstance(); + } + /** + * + * + *
+     * Exec resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder + getExecOrBuilder() { + if (resourceTypeCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.getDefaultInstance(); + } + + public static final int FILE_FIELD_NUMBER = 5; + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return resourceTypeCase_ == 5; + } + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource getFile() { + if (resourceTypeCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.getDefaultInstance(); + } + /** + * + * + *
+     * File resource
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder + getFileOrBuilder() { + if (resourceTypeCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (resourceTypeCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) resourceType_); + } + if (resourceTypeCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) resourceType_); + } + if (resourceTypeCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_); + } + if (resourceTypeCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (resourceTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_); + } + if (resourceTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_); + } + if (resourceTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_); + } + if (resourceTypeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_); + } + 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.v1alpha.OSPolicy.Resource)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource) obj; + + if (!getId().equals(other.getId())) return false; + if (!getResourceTypeCase().equals(other.getResourceTypeCase())) return false; + switch (resourceTypeCase_) { + case 2: + if (!getPkg().equals(other.getPkg())) return false; + break; + case 3: + if (!getRepository().equals(other.getRepository())) return false; + break; + case 4: + if (!getExec().equals(other.getExec())) return false; + break; + case 5: + if (!getFile().equals(other.getFile())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + switch (resourceTypeCase_) { + case 2: + hash = (37 * hash) + PKG_FIELD_NUMBER; + hash = (53 * hash) + getPkg().hashCode(); + break; + case 3: + hash = (37 * hash) + REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getRepository().hashCode(); + break; + case 4: + hash = (37 * hash) + EXEC_FIELD_NUMBER; + hash = (53 * hash) + getExec().hashCode(); + break; + case 5: + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource 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.v1alpha.OSPolicy.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource 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.v1alpha.OSPolicy.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource 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.v1alpha.OSPolicy.Resource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource 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.v1alpha.OSPolicy.Resource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource 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.v1alpha.OSPolicy.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An OS policy resource is used to define the desired state configuration
+     * and provides a specific functionality like installing/removing packages,
+     * executing a script etc.
+     * The system ensures that resources are always in their desired state by
+     * taking necessary actions if they have drifted from their desired state.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.Resource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.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(); + id_ = ""; + + resourceTypeCase_ = 0; + resourceType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource(this); + result.id_ = id_; + if (resourceTypeCase_ == 2) { + if (pkgBuilder_ == null) { + result.resourceType_ = resourceType_; + } else { + result.resourceType_ = pkgBuilder_.build(); + } + } + if (resourceTypeCase_ == 3) { + if (repositoryBuilder_ == null) { + result.resourceType_ = resourceType_; + } else { + result.resourceType_ = repositoryBuilder_.build(); + } + } + if (resourceTypeCase_ == 4) { + if (execBuilder_ == null) { + result.resourceType_ = resourceType_; + } else { + result.resourceType_ = execBuilder_.build(); + } + } + if (resourceTypeCase_ == 5) { + if (fileBuilder_ == null) { + result.resourceType_ = resourceType_; + } else { + result.resourceType_ = fileBuilder_.build(); + } + } + result.resourceTypeCase_ = resourceTypeCase_; + 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.v1alpha.OSPolicy.Resource) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.Resource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + switch (other.getResourceTypeCase()) { + case PKG: + { + mergePkg(other.getPkg()); + break; + } + case REPOSITORY: + { + mergeRepository(other.getRepository()); + break; + } + case EXEC: + { + mergeExec(other.getExec()); + break; + } + case FILE: + { + mergeFile(other.getFile()); + break; + } + case RESOURCETYPE_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.v1alpha.OSPolicy.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int resourceTypeCase_ = 0; + private java.lang.Object resourceType_; + + public ResourceTypeCase getResourceTypeCase() { + return ResourceTypeCase.forNumber(resourceTypeCase_); + } + + public Builder clearResourceType() { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Required. The id of the resource with the following restrictions:
+       * * 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 OS policy.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The id of the resource with the following restrictions:
+       * * 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 OS policy.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The id of the resource with the following restrictions:
+       * * 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 OS policy.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The id of the resource with the following restrictions:
+       * * 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 OS policy.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The id of the resource with the following restrictions:
+       * * 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 OS policy.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder> + pkgBuilder_; + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return Whether the pkg field is set. + */ + @java.lang.Override + public boolean hasPkg() { + return resourceTypeCase_ == 2; + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + * + * @return The pkg. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource getPkg() { + if (pkgBuilder_ == null) { + if (resourceTypeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } else { + if (resourceTypeCase_ == 2) { + return pkgBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + public Builder setPkg( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource value) { + if (pkgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + onChanged(); + } else { + pkgBuilder_.setMessage(value); + } + resourceTypeCase_ = 2; + return this; + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + public Builder setPkg( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder + builderForValue) { + if (pkgBuilder_ == null) { + resourceType_ = builderForValue.build(); + onChanged(); + } else { + pkgBuilder_.setMessage(builderForValue.build()); + } + resourceTypeCase_ = 2; + return this; + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + public Builder mergePkg( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource value) { + if (pkgBuilder_ == null) { + if (resourceTypeCase_ == 2 + && resourceType_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance()) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceType_ = value; + } + onChanged(); + } else { + if (resourceTypeCase_ == 2) { + pkgBuilder_.mergeFrom(value); + } + pkgBuilder_.setMessage(value); + } + resourceTypeCase_ = 2; + return this; + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + public Builder clearPkg() { + if (pkgBuilder_ == null) { + if (resourceTypeCase_ == 2) { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + } + } else { + if (resourceTypeCase_ == 2) { + resourceTypeCase_ = 0; + resourceType_ = null; + } + pkgBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder + getPkgBuilder() { + return getPkgFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder + getPkgOrBuilder() { + if ((resourceTypeCase_ == 2) && (pkgBuilder_ != null)) { + return pkgBuilder_.getMessageOrBuilder(); + } else { + if (resourceTypeCase_ == 2) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Package resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource pkg = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder> + getPkgFieldBuilder() { + if (pkgBuilder_ == null) { + if (!(resourceTypeCase_ == 2)) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource + .getDefaultInstance(); + } + pkgBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResourceOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.PackageResource) + resourceType_, + getParentForChildren(), + isClean()); + resourceType_ = null; + } + resourceTypeCase_ = 2; + onChanged(); + ; + return pkgBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder> + repositoryBuilder_; + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return Whether the repository field is set. + */ + @java.lang.Override + public boolean hasRepository() { + return resourceTypeCase_ == 3; + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + * + * @return The repository. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + getRepository() { + if (repositoryBuilder_ == null) { + if (resourceTypeCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } else { + if (resourceTypeCase_ == 3) { + return repositoryBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + public Builder setRepository( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource value) { + if (repositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + onChanged(); + } else { + repositoryBuilder_.setMessage(value); + } + resourceTypeCase_ = 3; + return this; + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + public Builder setRepository( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder + builderForValue) { + if (repositoryBuilder_ == null) { + resourceType_ = builderForValue.build(); + onChanged(); + } else { + repositoryBuilder_.setMessage(builderForValue.build()); + } + resourceTypeCase_ = 3; + return this; + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + public Builder mergeRepository( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource value) { + if (repositoryBuilder_ == null) { + if (resourceTypeCase_ == 3 + && resourceType_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance()) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceType_ = value; + } + onChanged(); + } else { + if (resourceTypeCase_ == 3) { + repositoryBuilder_.mergeFrom(value); + } + repositoryBuilder_.setMessage(value); + } + resourceTypeCase_ = 3; + return this; + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + public Builder clearRepository() { + if (repositoryBuilder_ == null) { + if (resourceTypeCase_ == 3) { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + } + } else { + if (resourceTypeCase_ == 3) { + resourceTypeCase_ = 0; + resourceType_ = null; + } + repositoryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder + getRepositoryBuilder() { + return getRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder + getRepositoryOrBuilder() { + if ((resourceTypeCase_ == 3) && (repositoryBuilder_ != null)) { + return repositoryBuilder_.getMessageOrBuilder(); + } else { + if (resourceTypeCase_ == 3) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Package repository resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource repository = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder> + getRepositoryFieldBuilder() { + if (repositoryBuilder_ == null) { + if (!(resourceTypeCase_ == 3)) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource + .getDefaultInstance(); + } + repositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResourceOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.RepositoryResource) + resourceType_, + getParentForChildren(), + isClean()); + resourceType_ = null; + } + resourceTypeCase_ = 3; + onChanged(); + ; + return repositoryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder> + execBuilder_; + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return Whether the exec field is set. + */ + @java.lang.Override + public boolean hasExec() { + return resourceTypeCase_ == 4; + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + * + * @return The exec. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource getExec() { + if (execBuilder_ == null) { + if (resourceTypeCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance(); + } else { + if (resourceTypeCase_ == 4) { + return execBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + public Builder setExec( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource value) { + if (execBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + onChanged(); + } else { + execBuilder_.setMessage(value); + } + resourceTypeCase_ = 4; + return this; + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + public Builder setExec( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder + builderForValue) { + if (execBuilder_ == null) { + resourceType_ = builderForValue.build(); + onChanged(); + } else { + execBuilder_.setMessage(builderForValue.build()); + } + resourceTypeCase_ = 4; + return this; + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + public Builder mergeExec( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource value) { + if (execBuilder_ == null) { + if (resourceTypeCase_ == 4 + && resourceType_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance()) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) + resourceType_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceType_ = value; + } + onChanged(); + } else { + if (resourceTypeCase_ == 4) { + execBuilder_.mergeFrom(value); + } + execBuilder_.setMessage(value); + } + resourceTypeCase_ = 4; + return this; + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + public Builder clearExec() { + if (execBuilder_ == null) { + if (resourceTypeCase_ == 4) { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + } + } else { + if (resourceTypeCase_ == 4) { + resourceTypeCase_ = 0; + resourceType_ = null; + } + execBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder + getExecBuilder() { + return getExecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder + getExecOrBuilder() { + if ((resourceTypeCase_ == 4) && (execBuilder_ != null)) { + return execBuilder_.getMessageOrBuilder(); + } else { + if (resourceTypeCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Exec resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource exec = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder> + getExecFieldBuilder() { + if (execBuilder_ == null) { + if (!(resourceTypeCase_ == 4)) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource + .getDefaultInstance(); + } + execBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResourceOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.ExecResource) resourceType_, + getParentForChildren(), + isClean()); + resourceType_ = null; + } + resourceTypeCase_ = 4; + onChanged(); + ; + return execBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder> + fileBuilder_; + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return resourceTypeCase_ == 5; + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource getFile() { + if (fileBuilder_ == null) { + if (resourceTypeCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance(); + } else { + if (resourceTypeCase_ == 5) { + return fileBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + public Builder setFile( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource value) { + if (fileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + onChanged(); + } else { + fileBuilder_.setMessage(value); + } + resourceTypeCase_ = 5; + return this; + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + public Builder setFile( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder + builderForValue) { + if (fileBuilder_ == null) { + resourceType_ = builderForValue.build(); + onChanged(); + } else { + fileBuilder_.setMessage(builderForValue.build()); + } + resourceTypeCase_ = 5; + return this; + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + public Builder mergeFile( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource value) { + if (fileBuilder_ == null) { + if (resourceTypeCase_ == 5 + && resourceType_ + != com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance()) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) + resourceType_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceType_ = value; + } + onChanged(); + } else { + if (resourceTypeCase_ == 5) { + fileBuilder_.mergeFrom(value); + } + fileBuilder_.setMessage(value); + } + resourceTypeCase_ = 5; + return this; + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + public Builder clearFile() { + if (fileBuilder_ == null) { + if (resourceTypeCase_ == 5) { + resourceTypeCase_ = 0; + resourceType_ = null; + onChanged(); + } + } else { + if (resourceTypeCase_ == 5) { + resourceTypeCase_ = 0; + resourceType_ = null; + } + fileBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder + getFileBuilder() { + return getFileFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder + getFileOrBuilder() { + if ((resourceTypeCase_ == 5) && (fileBuilder_ != null)) { + return fileBuilder_.getMessageOrBuilder(); + } else { + if (resourceTypeCase_ == 5) { + return (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance(); + } + } + /** + * + * + *
+       * File resource
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource file = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder> + getFileFieldBuilder() { + if (fileBuilder_ == null) { + if (!(resourceTypeCase_ == 5)) { + resourceType_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource + .getDefaultInstance(); + } + fileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResourceOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource) resourceType_, + getParentForChildren(), + isClean()); + resourceType_ = null; + } + resourceTypeCase_ = 5; + onChanged(); + ; + return fileBuilder_; + } + + @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.v1alpha.OSPolicy.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.Resource) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.Resource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.Resource(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(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.v1alpha.OSPolicy.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResourceGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * @return Whether the osFilter field is set. + */ + boolean hasOsFilter(); + /** + * + * + *
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * @return The osFilter. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter(); + /** + * + * + *
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder(); + + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getResourcesList(); + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource getResources(int index); + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getResourcesCount(); + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getResourcesOrBuilderList(); + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder getResourcesOrBuilder(int index); + } + /** + * + * + *
+   * Resource groups provide a mechanism to group OS policy resources.
+   * Resource groups enable OS policy authors to create a single OS policy
+   * to be applied to VMs running different operating Systems.
+   * When the OS policy is applied to a target VM, the appropriate resource
+   * group within the OS policy is selected based on the `OSFilter` specified
+   * within the resource group.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} + */ + public static final class ResourceGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) + ResourceGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceGroup.newBuilder() to construct. + private ResourceGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceGroup() { + resources_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceGroup(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourceGroup( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder subBuilder = null; + if (osFilter_ != null) { + subBuilder = osFilter_.toBuilder(); + } + osFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(osFilter_); + osFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource>(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder.class); + } + + public static final int OS_FILTER_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter osFilter_; + /** + * + * + *
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * @return Whether the osFilter field is set. + */ + @java.lang.Override + public boolean hasOsFilter() { + return osFilter_ != null; + } + /** + * + * + *
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * @return The osFilter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter() { + return osFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() + : osFilter_; + } + /** + * + * + *
+     * Used to specify the OS filter for a resource group
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder() { + return getOsFilter(); + } + + public static final int RESOURCES_FIELD_NUMBER = 2; + private java.util.List resources_; + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getResourcesList() { + return resources_; + } + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getResourcesOrBuilderList() { + return resources_; + } + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+     * Required. List of resources configured for this resource group.
+     * The resources are executed in the exact order specified here.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder getResourcesOrBuilder( + int index) { + return resources_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (osFilter_ != null) { + output.writeMessage(1, getOsFilter()); + } + for (int i = 0; i < resources_.size(); i++) { + output.writeMessage(2, resources_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (osFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOsFilter()); + } + for (int i = 0; i < resources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, resources_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup other = + (com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) obj; + + if (hasOsFilter() != other.hasOsFilter()) return false; + if (hasOsFilter()) { + if (!getOsFilter().equals(other.getOsFilter())) return false; + } + if (!getResourcesList().equals(other.getResourcesList())) 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 (hasOsFilter()) { + hash = (37 * hash) + OS_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getOsFilter().hashCode(); + } + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup 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.v1alpha.OSPolicy.ResourceGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup 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.v1alpha.OSPolicy.ResourceGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup 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.v1alpha.OSPolicy.ResourceGroup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup 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.v1alpha.OSPolicy.ResourceGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup 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.v1alpha.OSPolicy.ResourceGroup 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; + } + /** + * + * + *
+     * Resource groups provide a mechanism to group OS policy resources.
+     * Resource groups enable OS policy authors to create a single OS policy
+     * to be applied to VMs running different operating Systems.
+     * When the OS policy is applied to a target VM, the appropriate resource
+     * group within the OS policy is selected based on the `OSFilter` specified
+     * within the resource group.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (osFilterBuilder_ == null) { + osFilter_ = null; + } else { + osFilter_ = null; + osFilterBuilder_ = null; + } + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourcesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup build() { + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup result = + new com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(this); + int from_bitField0_ = bitField0_; + if (osFilterBuilder_ == null) { + result.osFilter_ = osFilter_; + } else { + result.osFilter_ = osFilterBuilder_.build(); + } + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.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.v1alpha.OSPolicy.ResourceGroup) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance()) + return this; + if (other.hasOsFilter()) { + mergeOsFilter(other.getOsFilter()); + } + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcesFieldBuilder() + : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + 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.v1alpha.OSPolicy.ResourceGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter osFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder> + osFilterBuilder_; + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * @return Whether the osFilter field is set. + */ + public boolean hasOsFilter() { + return osFilterBuilder_ != null || osFilter_ != null; + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + * + * @return The osFilter. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter getOsFilter() { + if (osFilterBuilder_ == null) { + return osFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() + : osFilter_; + } else { + return osFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + public Builder setOsFilter(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter value) { + if (osFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + osFilter_ = value; + onChanged(); + } else { + osFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + public Builder setOsFilter( + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder builderForValue) { + if (osFilterBuilder_ == null) { + osFilter_ = builderForValue.build(); + onChanged(); + } else { + osFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + public Builder mergeOsFilter(com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter value) { + if (osFilterBuilder_ == null) { + if (osFilter_ != null) { + osFilter_ = + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.newBuilder(osFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + osFilter_ = value; + } + onChanged(); + } else { + osFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + public Builder clearOsFilter() { + if (osFilterBuilder_ == null) { + osFilter_ = null; + onChanged(); + } else { + osFilter_ = null; + osFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder getOsFilterBuilder() { + + onChanged(); + return getOsFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder getOsFilterOrBuilder() { + if (osFilterBuilder_ != null) { + return osFilterBuilder_.getMessageOrBuilder(); + } else { + return osFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.getDefaultInstance() + : osFilter_; + } + } + /** + * + * + *
+       * Used to specify the OS filter for a resource group
+       * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicy.OSFilter os_filter = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder> + getOsFilterFieldBuilder() { + if (osFilterBuilder_ == null) { + osFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.OSFilterOrBuilder>( + getOsFilter(), getParentForChildren(), isClean()); + osFilter_ = null; + } + return osFilterBuilder_; + } + + private java.util.List resources_ = + java.util.Collections.emptyList(); + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList( + resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder> + resourcesBuilder_; + + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourcesList() { + if (resourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resources_); + } else { + return resourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getResourcesCount() { + if (resourcesBuilder_ == null) { + return resources_.size(); + } else { + return resourcesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource getResources(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResources( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResources( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResources(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + } else { + resourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResources( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(index, value); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResources( + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResources( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllResources( + java.lang.Iterable + values) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + } else { + resourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeResources(int index) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.remove(index); + onChanged(); + } else { + resourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder getResourcesBuilder( + int index) { + return getResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder getResourcesOrBuilder( + int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourcesOrBuilderList() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resources_); + } + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder addResourcesBuilder() { + return getResourcesFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder addResourcesBuilder( + int index) { + return getResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of resources configured for this resource group.
+       * The resources are executed in the exact order specified here.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource, + com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceOrBuilder>( + resources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + @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.v1alpha.OSPolicy.ResourceGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceGroup(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.v1alpha.OSPolicy.ResourceGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Required. The id of the OS policy with the following restrictions:
+   * * 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 assignment.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id of the OS policy with the following restrictions:
+   * * 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 assignment.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Policy description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Policy description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODE_FIELD_NUMBER = 3; + private int mode_; + /** + * + * + *
+   * Required. Policy mode
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+   * Required. Policy mode
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Mode result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Mode.valueOf(mode_); + return result == null ? com.google.cloud.osconfig.v1alpha.OSPolicy.Mode.UNRECOGNIZED : result; + } + + public static final int RESOURCE_GROUPS_FIELD_NUMBER = 4; + private java.util.List resourceGroups_; + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getResourceGroupsList() { + return resourceGroups_; + } + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getResourceGroupsOrBuilderList() { + return resourceGroups_; + } + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getResourceGroupsCount() { + return resourceGroups_.size(); + } + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getResourceGroups(int index) { + return resourceGroups_.get(index); + } + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder + getResourceGroupsOrBuilder(int index) { + return resourceGroups_.get(index); + } + + public static final int ALLOW_NO_RESOURCE_GROUP_MATCH_FIELD_NUMBER = 5; + private boolean allowNoResourceGroupMatch_; + /** + * + * + *
+   * This flag determines the OS policy compliance status when none of the
+   * resource groups within the policy are applicable for a VM. Set this value
+   * to `true` if the policy needs to be reported as compliant even if the
+   * policy has nothing to validate or enforce.
+   * 
+ * + * bool allow_no_resource_group_match = 5; + * + * @return The allowNoResourceGroupMatch. + */ + @java.lang.Override + public boolean getAllowNoResourceGroupMatch() { + return allowNoResourceGroupMatch_; + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (mode_ != com.google.cloud.osconfig.v1alpha.OSPolicy.Mode.MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, mode_); + } + for (int i = 0; i < resourceGroups_.size(); i++) { + output.writeMessage(4, resourceGroups_.get(i)); + } + if (allowNoResourceGroupMatch_ != false) { + output.writeBool(5, allowNoResourceGroupMatch_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (mode_ != com.google.cloud.osconfig.v1alpha.OSPolicy.Mode.MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, mode_); + } + for (int i = 0; i < resourceGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, resourceGroups_.get(i)); + } + if (allowNoResourceGroupMatch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowNoResourceGroupMatch_); + } + 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.v1alpha.OSPolicy)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicy other = + (com.google.cloud.osconfig.v1alpha.OSPolicy) obj; + + if (!getId().equals(other.getId())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (mode_ != other.mode_) return false; + if (!getResourceGroupsList().equals(other.getResourceGroupsList())) return false; + if (getAllowNoResourceGroupMatch() != other.getAllowNoResourceGroupMatch()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + if (getResourceGroupsCount() > 0) { + hash = (37 * hash) + RESOURCE_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getResourceGroupsList().hashCode(); + } + hash = (37 * hash) + ALLOW_NO_RESOURCE_GROUP_MATCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowNoResourceGroupMatch()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy 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.v1alpha.OSPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy 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.v1alpha.OSPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy 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.v1alpha.OSPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy 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.v1alpha.OSPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy 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.v1alpha.OSPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An OS policy defines the desired state configuration for a VM.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicy) + com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicy.class, + com.google.cloud.osconfig.v1alpha.OSPolicy.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourceGroupsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + description_ = ""; + + mode_ = 0; + + if (resourceGroupsBuilder_ == null) { + resourceGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourceGroupsBuilder_.clear(); + } + allowNoResourceGroupMatch_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy build() { + com.google.cloud.osconfig.v1alpha.OSPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicy result = + new com.google.cloud.osconfig.v1alpha.OSPolicy(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.description_ = description_; + result.mode_ = mode_; + if (resourceGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceGroups_ = java.util.Collections.unmodifiableList(resourceGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceGroups_ = resourceGroups_; + } else { + result.resourceGroups_ = resourceGroupsBuilder_.build(); + } + result.allowNoResourceGroupMatch_ = allowNoResourceGroupMatch_; + 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.v1alpha.OSPolicy) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicy other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicy.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (resourceGroupsBuilder_ == null) { + if (!other.resourceGroups_.isEmpty()) { + if (resourceGroups_.isEmpty()) { + resourceGroups_ = other.resourceGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceGroupsIsMutable(); + resourceGroups_.addAll(other.resourceGroups_); + } + onChanged(); + } + } else { + if (!other.resourceGroups_.isEmpty()) { + if (resourceGroupsBuilder_.isEmpty()) { + resourceGroupsBuilder_.dispose(); + resourceGroupsBuilder_ = null; + resourceGroups_ = other.resourceGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceGroupsFieldBuilder() + : null; + } else { + resourceGroupsBuilder_.addAllMessages(other.resourceGroups_); + } + } + } + if (other.getAllowNoResourceGroupMatch() != false) { + setAllowNoResourceGroupMatch(other.getAllowNoResourceGroupMatch()); + } + 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.v1alpha.OSPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.osconfig.v1alpha.OSPolicy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Required. The id of the OS policy with the following restrictions:
+     * * 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 assignment.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id of the OS policy with the following restrictions:
+     * * 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 assignment.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id of the OS policy with the following restrictions:
+     * * 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 assignment.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the OS policy with the following restrictions:
+     * * 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 assignment.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the OS policy with the following restrictions:
+     * * 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 assignment.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Policy description.
+     * 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; + } + } + /** + * + * + *
+     * Policy description.
+     * 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; + } + } + /** + * + * + *
+     * Policy description.
+     * 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; + } + /** + * + * + *
+     * Policy description.
+     * 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; + } + /** + * + * + *
+     * Policy description.
+     * 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 int mode_ = 0; + /** + * + * + *
+     * Required. Policy mode
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + /** + * + * + *
+     * Required. Policy mode
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + + mode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Policy mode
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy.Mode getMode() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicy.Mode result = + com.google.cloud.osconfig.v1alpha.OSPolicy.Mode.valueOf(mode_); + return result == null ? com.google.cloud.osconfig.v1alpha.OSPolicy.Mode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. Policy mode
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(com.google.cloud.osconfig.v1alpha.OSPolicy.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Policy mode
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = 0; + onChanged(); + return this; + } + + private java.util.List + resourceGroups_ = java.util.Collections.emptyList(); + + private void ensureResourceGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceGroups_ = + new java.util.ArrayList( + resourceGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder> + resourceGroupsBuilder_; + + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourceGroupsList() { + if (resourceGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceGroups_); + } else { + return resourceGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getResourceGroupsCount() { + if (resourceGroupsBuilder_ == null) { + return resourceGroups_.size(); + } else { + return resourceGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getResourceGroups(int index) { + if (resourceGroupsBuilder_ == null) { + return resourceGroups_.get(index); + } else { + return resourceGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourceGroups( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup value) { + if (resourceGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceGroupsIsMutable(); + resourceGroups_.set(index, value); + onChanged(); + } else { + resourceGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setResourceGroups( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder builderForValue) { + if (resourceGroupsBuilder_ == null) { + ensureResourceGroupsIsMutable(); + resourceGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceGroups( + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup value) { + if (resourceGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceGroupsIsMutable(); + resourceGroups_.add(value); + onChanged(); + } else { + resourceGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceGroups( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup value) { + if (resourceGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceGroupsIsMutable(); + resourceGroups_.add(index, value); + onChanged(); + } else { + resourceGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceGroups( + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder builderForValue) { + if (resourceGroupsBuilder_ == null) { + ensureResourceGroupsIsMutable(); + resourceGroups_.add(builderForValue.build()); + onChanged(); + } else { + resourceGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addResourceGroups( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder builderForValue) { + if (resourceGroupsBuilder_ == null) { + ensureResourceGroupsIsMutable(); + resourceGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllResourceGroups( + java.lang.Iterable + values) { + if (resourceGroupsBuilder_ == null) { + ensureResourceGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceGroups_); + onChanged(); + } else { + resourceGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearResourceGroups() { + if (resourceGroupsBuilder_ == null) { + resourceGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeResourceGroups(int index) { + if (resourceGroupsBuilder_ == null) { + ensureResourceGroupsIsMutable(); + resourceGroups_.remove(index); + onChanged(); + } else { + resourceGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder + getResourceGroupsBuilder(int index) { + return getResourceGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder + getResourceGroupsOrBuilder(int index) { + if (resourceGroupsBuilder_ == null) { + return resourceGroups_.get(index); + } else { + return resourceGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder> + getResourceGroupsOrBuilderList() { + if (resourceGroupsBuilder_ != null) { + return resourceGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceGroups_); + } + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder + addResourceGroupsBuilder() { + return getResourceGroupsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance()); + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder + addResourceGroupsBuilder(int index) { + return getResourceGroupsFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.getDefaultInstance()); + } + /** + * + * + *
+     * Required. List of resource groups for the policy.
+     * For a particular VM, resource groups are evaluated in the order specified
+     * and the first resource group that is applicable is selected and the rest
+     * are ignored.
+     * If none of the resource groups are applicable for a VM, the VM is
+     * considered to be non-compliant w.r.t this policy. This behavior can be
+     * toggled by the flag `allow_no_resource_group_match`
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getResourceGroupsBuilderList() { + return getResourceGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder> + getResourceGroupsFieldBuilder() { + if (resourceGroupsBuilder_ == null) { + resourceGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder>( + resourceGroups_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resourceGroups_ = null; + } + return resourceGroupsBuilder_; + } + + private boolean allowNoResourceGroupMatch_; + /** + * + * + *
+     * This flag determines the OS policy compliance status when none of the
+     * resource groups within the policy are applicable for a VM. Set this value
+     * to `true` if the policy needs to be reported as compliant even if the
+     * policy has nothing to validate or enforce.
+     * 
+ * + * bool allow_no_resource_group_match = 5; + * + * @return The allowNoResourceGroupMatch. + */ + @java.lang.Override + public boolean getAllowNoResourceGroupMatch() { + return allowNoResourceGroupMatch_; + } + /** + * + * + *
+     * This flag determines the OS policy compliance status when none of the
+     * resource groups within the policy are applicable for a VM. Set this value
+     * to `true` if the policy needs to be reported as compliant even if the
+     * policy has nothing to validate or enforce.
+     * 
+ * + * bool allow_no_resource_group_match = 5; + * + * @param value The allowNoResourceGroupMatch to set. + * @return This builder for chaining. + */ + public Builder setAllowNoResourceGroupMatch(boolean value) { + + allowNoResourceGroupMatch_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This flag determines the OS policy compliance status when none of the
+     * resource groups within the policy are applicable for a VM. Set this value
+     * to `true` if the policy needs to be reported as compliant even if the
+     * policy has nothing to validate or enforce.
+     * 
+ * + * bool allow_no_resource_group_match = 5; + * + * @return This builder for chaining. + */ + public Builder clearAllowNoResourceGroupMatch() { + + allowNoResourceGroupMatch_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.OSPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicy) + private static final com.google.cloud.osconfig.v1alpha.OSPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicy(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicy(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.v1alpha.OSPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java new file mode 100644 index 00000000..85e108b5 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignment.java @@ -0,0 +1,7921 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * OS policy assignment is an API resource that is used to
+ * apply a set of OS policies to a dynamically targeted group of Compute Engine
+ * VM instances.
+ * An OS policy is used to define the desired state configuration for a
+ * Compute Engine VM instance through a set of configuration resources that
+ * provide capabilities such as installing or removing software packages, or
+ * executing a script.
+ * For more information, see [OS policy and OS policy
+ * assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment} + */ +public final class OSPolicyAssignment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment) + OSPolicyAssignmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyAssignment.newBuilder() to construct. + private OSPolicyAssignment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyAssignment() { + name_ = ""; + description_ = ""; + osPolicies_ = java.util.Collections.emptyList(); + revisionId_ = ""; + rolloutState_ = 0; + uid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyAssignment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyAssignment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osPolicies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + osPolicies_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicy.parser(), extensionRegistry)); + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder + subBuilder = null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instanceFilter_); + instanceFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder subBuilder = + null; + if (rollout_ != null) { + subBuilder = rollout_.toBuilder(); + } + rollout_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rollout_); + rollout_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + revisionId_ = s; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (revisionCreateTime_ != null) { + subBuilder = revisionCreateTime_.toBuilder(); + } + revisionCreateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(revisionCreateTime_); + revisionCreateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 72: + { + int rawValue = input.readEnum(); + + rolloutState_ = rawValue; + break; + } + case 80: + { + baseline_ = input.readBool(); + break; + } + case 88: + { + deleted_ = input.readBool(); + break; + } + case 96: + { + reconciling_ = input.readBool(); + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + uid_ = 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)) { + osPolicies_ = java.util.Collections.unmodifiableList(osPolicies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder.class); + } + + /** + * + * + *
+   * OS policy assignment rollout state
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState} + */ + public enum RolloutState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value
+     * 
+ * + * ROLLOUT_STATE_UNSPECIFIED = 0; + */ + ROLLOUT_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The rollout is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+     * The rollout is being cancelled.
+     * 
+ * + * CANCELLING = 2; + */ + CANCELLING(2), + /** + * + * + *
+     * The rollout is cancelled.
+     * 
+ * + * CANCELLED = 3; + */ + CANCELLED(3), + /** + * + * + *
+     * The rollout has completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value
+     * 
+ * + * ROLLOUT_STATE_UNSPECIFIED = 0; + */ + public static final int ROLLOUT_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The rollout is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+     * The rollout is being cancelled.
+     * 
+ * + * CANCELLING = 2; + */ + public static final int CANCELLING_VALUE = 2; + /** + * + * + *
+     * The rollout is cancelled.
+     * 
+ * + * CANCELLED = 3; + */ + public static final int CANCELLED_VALUE = 3; + /** + * + * + *
+     * The rollout has completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RolloutState 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 RolloutState forNumber(int value) { + switch (value) { + case 0: + return ROLLOUT_STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return CANCELLING; + case 3: + return CANCELLED; + case 4: + return SUCCEEDED; + 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 RolloutState findValueByNumber(int number) { + return RolloutState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RolloutState[] VALUES = values(); + + public static RolloutState 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 RolloutState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState) + } + + public interface LabelSetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + int getLabelsCount(); + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + } + /** + * + * + *
+   * Message representing label set.
+   * * A label is a key value pair set for a VM.
+   * * A LabelSet is a set of labels.
+   * * Labels within a LabelSet are ANDed. In other words, a LabelSet is
+   *   applicable for a VM only if it matches all the labels in the
+   *   LabelSet.
+   * * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will
+   *            only be applicable for those VMs with both labels
+   *            present.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} + */ + public static final class LabelSet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + LabelSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelSet.newBuilder() to construct. + private LabelSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelSet() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LabelSet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelSet( + 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Labels are identified by key/value pairs in this map.
+     * A VM should contain all the key/value pairs specified in this
+     * map to be selected.
+     * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + 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.v1alpha.OSPolicyAssignment.LabelSet)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) 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.v1alpha.OSPolicyAssignment.LabelSet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet 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.v1alpha.OSPolicyAssignment.LabelSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet 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.v1alpha.OSPolicyAssignment.LabelSet parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet 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.v1alpha.OSPolicyAssignment.LabelSet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet 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.v1alpha.OSPolicyAssignment.LabelSet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet 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.v1alpha.OSPolicyAssignment.LabelSet 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 representing label set.
+     * * A label is a key value pair set for a VM.
+     * * A LabelSet is a set of labels.
+     * * Labels within a LabelSet are ANDed. In other words, a LabelSet is
+     *   applicable for a VM only if it matches all the labels in the
+     *   LabelSet.
+     * * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will
+     *            only be applicable for those VMs with both labels
+     *            present.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(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.v1alpha.OSPolicyAssignment.LabelSet) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.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.v1alpha.OSPolicyAssignment.LabelSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + 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(); + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * 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(); + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * 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; + } + /** + * + * + *
+       * Labels are identified by key/value pairs in this map.
+       * A VM should contain all the key/value pairs specified in this
+       * map to be selected.
+       * 
+ * + * 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.v1alpha.OSPolicyAssignment.LabelSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelSet(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.v1alpha.OSPolicyAssignment.LabelSet + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Target all VMs in the project. If true, no other criteria is
+     * permitted.
+     * 
+ * + * bool all = 1; + * + * @return The all. + */ + boolean getAll(); + + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @return A list containing the osShortNames. + */ + java.util.List getOsShortNamesList(); + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @return The count of osShortNames. + */ + int getOsShortNamesCount(); + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index of the element to return. + * @return The osShortNames at the given index. + */ + java.lang.String getOsShortNames(int index); + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the osShortNames at the given index. + */ + com.google.protobuf.ByteString getOsShortNamesBytes(int index); + + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + java.util.List + getInclusionLabelsList(); + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels(int index); + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + int getInclusionLabelsCount(); + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + java.util.List + getInclusionLabelsOrBuilderList(); + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getInclusionLabelsOrBuilder(int index); + + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + java.util.List + getExclusionLabelsList(); + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels(int index); + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + int getExclusionLabelsCount(); + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + java.util.List + getExclusionLabelsOrBuilderList(); + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getExclusionLabelsOrBuilder(int index); + } + /** + * + * + *
+   * Message to represent the filters to select VMs for an assignment
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} + */ + public static final class InstanceFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + InstanceFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstanceFilter.newBuilder() to construct. + private InstanceFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstanceFilter() { + osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inclusionLabels_ = java.util.Collections.emptyList(); + exclusionLabels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstanceFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstanceFilter( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + osShortNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + osShortNames_.add(s); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + inclusionLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(); + mutable_bitField0_ |= 0x00000002; + } + inclusionLabels_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.parser(), + extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + exclusionLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(); + mutable_bitField0_ |= 0x00000004; + } + exclusionLabels_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + osShortNames_ = osShortNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + inclusionLabels_ = java.util.Collections.unmodifiableList(inclusionLabels_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + exclusionLabels_ = java.util.Collections.unmodifiableList(exclusionLabels_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder.class); + } + + public static final int ALL_FIELD_NUMBER = 1; + private boolean all_; + /** + * + * + *
+     * Target all VMs in the project. If true, no other criteria is
+     * permitted.
+     * 
+ * + * bool all = 1; + * + * @return The all. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + + public static final int OS_SHORT_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList osShortNames_; + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @return A list containing the osShortNames. + */ + public com.google.protobuf.ProtocolStringList getOsShortNamesList() { + return osShortNames_; + } + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @return The count of osShortNames. + */ + public int getOsShortNamesCount() { + return osShortNames_.size(); + } + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index of the element to return. + * @return The osShortNames at the given index. + */ + public java.lang.String getOsShortNames(int index) { + return osShortNames_.get(index); + } + /** + * + * + *
+     * A VM is included if it's OS short name matches with any of the
+     * values provided in this list.
+     * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the osShortNames at the given index. + */ + public com.google.protobuf.ByteString getOsShortNamesBytes(int index) { + return osShortNames_.getByteString(index); + } + + public static final int INCLUSION_LABELS_FIELD_NUMBER = 3; + private java.util.List + inclusionLabels_; + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public java.util.List + getInclusionLabelsList() { + return inclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getInclusionLabelsOrBuilderList() { + return inclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public int getInclusionLabelsCount() { + return inclusionLabels_.size(); + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels( + int index) { + return inclusionLabels_.get(index); + } + /** + * + * + *
+     * List of label sets used for VM inclusion.
+     * If the list has more than one `LabelSet`, the VM is included if any
+     * of the label sets are applicable for the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getInclusionLabelsOrBuilder(int index) { + return inclusionLabels_.get(index); + } + + public static final int EXCLUSION_LABELS_FIELD_NUMBER = 4; + private java.util.List + exclusionLabels_; + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public java.util.List + getExclusionLabelsList() { + return exclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getExclusionLabelsOrBuilderList() { + return exclusionLabels_; + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public int getExclusionLabelsCount() { + return exclusionLabels_.size(); + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels( + int index) { + return exclusionLabels_.get(index); + } + /** + * + * + *
+     * List of label sets used for VM exclusion.
+     * If the list has more than one label set, the VM is excluded if any
+     * of the label sets are applicable for the VM.
+     * This filter is applied last in the filtering chain and therefore a
+     * VM is guaranteed to be excluded if it satisfies one of the below
+     * label sets.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getExclusionLabelsOrBuilder(int index) { + return exclusionLabels_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (all_ != false) { + output.writeBool(1, all_); + } + for (int i = 0; i < osShortNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osShortNames_.getRaw(i)); + } + for (int i = 0; i < inclusionLabels_.size(); i++) { + output.writeMessage(3, inclusionLabels_.get(i)); + } + for (int i = 0; i < exclusionLabels_.size(); i++) { + output.writeMessage(4, exclusionLabels_.get(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_); + } + { + int dataSize = 0; + for (int i = 0; i < osShortNames_.size(); i++) { + dataSize += computeStringSizeNoTag(osShortNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getOsShortNamesList().size(); + } + for (int i = 0; i < inclusionLabels_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, inclusionLabels_.get(i)); + } + for (int i = 0; i < exclusionLabels_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, exclusionLabels_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) obj; + + if (getAll() != other.getAll()) return false; + if (!getOsShortNamesList().equals(other.getOsShortNamesList())) return false; + if (!getInclusionLabelsList().equals(other.getInclusionLabelsList())) return false; + if (!getExclusionLabelsList().equals(other.getExclusionLabelsList())) 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 (getOsShortNamesCount() > 0) { + hash = (37 * hash) + OS_SHORT_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getOsShortNamesList().hashCode(); + } + if (getInclusionLabelsCount() > 0) { + hash = (37 * hash) + INCLUSION_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getInclusionLabelsList().hashCode(); + } + if (getExclusionLabelsCount() > 0) { + hash = (37 * hash) + EXCLUSION_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getExclusionLabelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter 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.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter 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.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter 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.v1alpha.OSPolicyAssignment.InstanceFilter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + 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.v1alpha.OSPolicyAssignment.InstanceFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter 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.v1alpha.OSPolicyAssignment.InstanceFilter 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 to represent the filters to select VMs for an assignment
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInclusionLabelsFieldBuilder(); + getExclusionLabelsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + all_ = false; + + osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (inclusionLabelsBuilder_ == null) { + inclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + inclusionLabelsBuilder_.clear(); + } + if (exclusionLabelsBuilder_ == null) { + exclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + exclusionLabelsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(this); + int from_bitField0_ = bitField0_; + result.all_ = all_; + if (((bitField0_ & 0x00000001) != 0)) { + osShortNames_ = osShortNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osShortNames_ = osShortNames_; + if (inclusionLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + inclusionLabels_ = java.util.Collections.unmodifiableList(inclusionLabels_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.inclusionLabels_ = inclusionLabels_; + } else { + result.inclusionLabels_ = inclusionLabelsBuilder_.build(); + } + if (exclusionLabelsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + exclusionLabels_ = java.util.Collections.unmodifiableList(exclusionLabels_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.exclusionLabels_ = exclusionLabels_; + } else { + result.exclusionLabels_ = exclusionLabelsBuilder_.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.v1alpha.OSPolicyAssignment.InstanceFilter) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .getDefaultInstance()) return this; + if (other.getAll() != false) { + setAll(other.getAll()); + } + if (!other.osShortNames_.isEmpty()) { + if (osShortNames_.isEmpty()) { + osShortNames_ = other.osShortNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsShortNamesIsMutable(); + osShortNames_.addAll(other.osShortNames_); + } + onChanged(); + } + if (inclusionLabelsBuilder_ == null) { + if (!other.inclusionLabels_.isEmpty()) { + if (inclusionLabels_.isEmpty()) { + inclusionLabels_ = other.inclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.addAll(other.inclusionLabels_); + } + onChanged(); + } + } else { + if (!other.inclusionLabels_.isEmpty()) { + if (inclusionLabelsBuilder_.isEmpty()) { + inclusionLabelsBuilder_.dispose(); + inclusionLabelsBuilder_ = null; + inclusionLabels_ = other.inclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000002); + inclusionLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInclusionLabelsFieldBuilder() + : null; + } else { + inclusionLabelsBuilder_.addAllMessages(other.inclusionLabels_); + } + } + } + if (exclusionLabelsBuilder_ == null) { + if (!other.exclusionLabels_.isEmpty()) { + if (exclusionLabels_.isEmpty()) { + exclusionLabels_ = other.exclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.addAll(other.exclusionLabels_); + } + onChanged(); + } + } else { + if (!other.exclusionLabels_.isEmpty()) { + if (exclusionLabelsBuilder_.isEmpty()) { + exclusionLabelsBuilder_.dispose(); + exclusionLabelsBuilder_ = null; + exclusionLabels_ = other.exclusionLabels_; + bitField0_ = (bitField0_ & ~0x00000004); + exclusionLabelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExclusionLabelsFieldBuilder() + : null; + } else { + exclusionLabelsBuilder_.addAllMessages(other.exclusionLabels_); + } + } + } + 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.v1alpha.OSPolicyAssignment.InstanceFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean all_; + /** + * + * + *
+       * Target all VMs in the project. If true, no other criteria is
+       * permitted.
+       * 
+ * + * bool all = 1; + * + * @return The all. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + /** + * + * + *
+       * Target all VMs 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 VMs 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 com.google.protobuf.LazyStringList osShortNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureOsShortNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osShortNames_ = new com.google.protobuf.LazyStringArrayList(osShortNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @return A list containing the osShortNames. + */ + public com.google.protobuf.ProtocolStringList getOsShortNamesList() { + return osShortNames_.getUnmodifiableView(); + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @return The count of osShortNames. + */ + public int getOsShortNamesCount() { + return osShortNames_.size(); + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index of the element to return. + * @return The osShortNames at the given index. + */ + public java.lang.String getOsShortNames(int index) { + return osShortNames_.get(index); + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the osShortNames at the given index. + */ + public com.google.protobuf.ByteString getOsShortNamesBytes(int index) { + return osShortNames_.getByteString(index); + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @param index The index to set the value at. + * @param value The osShortNames to set. + * @return This builder for chaining. + */ + public Builder setOsShortNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsShortNamesIsMutable(); + osShortNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @param value The osShortNames to add. + * @return This builder for chaining. + */ + public Builder addOsShortNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsShortNamesIsMutable(); + osShortNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @param values The osShortNames to add. + * @return This builder for chaining. + */ + public Builder addAllOsShortNames(java.lang.Iterable values) { + ensureOsShortNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osShortNames_); + onChanged(); + return this; + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearOsShortNames() { + osShortNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * A VM is included if it's OS short name matches with any of the
+       * values provided in this list.
+       * 
+ * + * repeated string os_short_names = 2; + * + * @param value The bytes of the osShortNames to add. + * @return This builder for chaining. + */ + public Builder addOsShortNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOsShortNamesIsMutable(); + osShortNames_.add(value); + onChanged(); + return this; + } + + private java.util.List + inclusionLabels_ = java.util.Collections.emptyList(); + + private void ensureInclusionLabelsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + inclusionLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(inclusionLabels_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + inclusionLabelsBuilder_; + + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public java.util.List + getInclusionLabelsList() { + if (inclusionLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inclusionLabels_); + } else { + return inclusionLabelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public int getInclusionLabelsCount() { + if (inclusionLabelsBuilder_ == null) { + return inclusionLabels_.size(); + } else { + return inclusionLabelsBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getInclusionLabels( + int index) { + if (inclusionLabelsBuilder_ == null) { + return inclusionLabels_.get(index); + } else { + return inclusionLabelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder setInclusionLabels( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (inclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInclusionLabelsIsMutable(); + inclusionLabels_.set(index, value); + onChanged(); + } else { + inclusionLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder setInclusionLabels( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + inclusionLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder addInclusionLabels( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (inclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(value); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder addInclusionLabels( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (inclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(index, value); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder addInclusionLabels( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(builderForValue.build()); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder addInclusionLabels( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + inclusionLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder addAllInclusionLabels( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet> + values) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inclusionLabels_); + onChanged(); + } else { + inclusionLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder clearInclusionLabels() { + if (inclusionLabelsBuilder_ == null) { + inclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + inclusionLabelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public Builder removeInclusionLabels(int index) { + if (inclusionLabelsBuilder_ == null) { + ensureInclusionLabelsIsMutable(); + inclusionLabels_.remove(index); + onChanged(); + } else { + inclusionLabelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + getInclusionLabelsBuilder(int index) { + return getInclusionLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getInclusionLabelsOrBuilder(int index) { + if (inclusionLabelsBuilder_ == null) { + return inclusionLabels_.get(index); + } else { + return inclusionLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getInclusionLabelsOrBuilderList() { + if (inclusionLabelsBuilder_ != null) { + return inclusionLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inclusionLabels_); + } + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + addInclusionLabelsBuilder() { + return getInclusionLabelsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + addInclusionLabelsBuilder(int index) { + return getInclusionLabelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); + } + /** + * + * + *
+       * List of label sets used for VM inclusion.
+       * If the list has more than one `LabelSet`, the VM is included if any
+       * of the label sets are applicable for the VM.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet inclusion_labels = 3; + * + */ + public java.util.List + getInclusionLabelsBuilderList() { + return getInclusionLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getInclusionLabelsFieldBuilder() { + if (inclusionLabelsBuilder_ == null) { + inclusionLabelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder>( + inclusionLabels_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + inclusionLabels_ = null; + } + return inclusionLabelsBuilder_; + } + + private java.util.List + exclusionLabels_ = java.util.Collections.emptyList(); + + private void ensureExclusionLabelsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + exclusionLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet>(exclusionLabels_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + exclusionLabelsBuilder_; + + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public java.util.List + getExclusionLabelsList() { + if (exclusionLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(exclusionLabels_); + } else { + return exclusionLabelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public int getExclusionLabelsCount() { + if (exclusionLabelsBuilder_ == null) { + return exclusionLabels_.size(); + } else { + return exclusionLabelsBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet getExclusionLabels( + int index) { + if (exclusionLabelsBuilder_ == null) { + return exclusionLabels_.get(index); + } else { + return exclusionLabelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder setExclusionLabels( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (exclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusionLabelsIsMutable(); + exclusionLabels_.set(index, value); + onChanged(); + } else { + exclusionLabelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder setExclusionLabels( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + exclusionLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder addExclusionLabels( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (exclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(value); + onChanged(); + } else { + exclusionLabelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder addExclusionLabels( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet value) { + if (exclusionLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(index, value); + onChanged(); + } else { + exclusionLabelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder addExclusionLabels( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(builderForValue.build()); + onChanged(); + } else { + exclusionLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder addExclusionLabels( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder builderForValue) { + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + exclusionLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder addAllExclusionLabels( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet> + values) { + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exclusionLabels_); + onChanged(); + } else { + exclusionLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder clearExclusionLabels() { + if (exclusionLabelsBuilder_ == null) { + exclusionLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + exclusionLabelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public Builder removeExclusionLabels(int index) { + if (exclusionLabelsBuilder_ == null) { + ensureExclusionLabelsIsMutable(); + exclusionLabels_.remove(index); + onChanged(); + } else { + exclusionLabelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + getExclusionLabelsBuilder(int index) { + return getExclusionLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder + getExclusionLabelsOrBuilder(int index) { + if (exclusionLabelsBuilder_ == null) { + return exclusionLabels_.get(index); + } else { + return exclusionLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getExclusionLabelsOrBuilderList() { + if (exclusionLabelsBuilder_ != null) { + return exclusionLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exclusionLabels_); + } + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + addExclusionLabelsBuilder() { + return getExclusionLabelsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder + addExclusionLabelsBuilder(int index) { + return getExclusionLabelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.getDefaultInstance()); + } + /** + * + * + *
+       * List of label sets used for VM exclusion.
+       * If the list has more than one label set, the VM is excluded if any
+       * of the label sets are applicable for the VM.
+       * This filter is applied last in the filtering chain and therefore a
+       * VM is guaranteed to be excluded if it satisfies one of the below
+       * label sets.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet exclusion_labels = 4; + * + */ + public java.util.List + getExclusionLabelsBuilderList() { + return getExclusionLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder> + getExclusionLabelsFieldBuilder() { + if (exclusionLabelsBuilder_ == null) { + exclusionLabelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSetOrBuilder>( + exclusionLabels_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + exclusionLabels_ = null; + } + return exclusionLabelsBuilder_; + } + + @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.v1alpha.OSPolicyAssignment.InstanceFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstanceFilter(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.v1alpha.OSPolicyAssignment.InstanceFilter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RolloutOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+     * any given moment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the disruptionBudget field is set. + */ + boolean hasDisruptionBudget(); + /** + * + * + *
+     * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+     * any given moment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The disruptionBudget. + */ + com.google.cloud.osconfig.v1alpha.FixedOrPercent getDisruptionBudget(); + /** + * + * + *
+     * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+     * any given moment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder getDisruptionBudgetOrBuilder(); + + /** + * + * + *
+     * Required. This determines the minimum duration of time to wait after the
+     * configuration changes are applied through the current rollout. A
+     * VM continues to count towards the `disruption_budget` at least
+     * until this duration of time has passed after configuration changes are
+     * applied.
+     * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the minWaitDuration field is set. + */ + boolean hasMinWaitDuration(); + /** + * + * + *
+     * Required. This determines the minimum duration of time to wait after the
+     * configuration changes are applied through the current rollout. A
+     * VM continues to count towards the `disruption_budget` at least
+     * until this duration of time has passed after configuration changes are
+     * applied.
+     * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The minWaitDuration. + */ + com.google.protobuf.Duration getMinWaitDuration(); + /** + * + * + *
+     * Required. This determines the minimum duration of time to wait after the
+     * configuration changes are applied through the current rollout. A
+     * VM continues to count towards the `disruption_budget` at least
+     * until this duration of time has passed after configuration changes are
+     * applied.
+     * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getMinWaitDurationOrBuilder(); + } + /** + * + * + *
+   * Message to configure the rollout at the zonal level for the OS policy
+   * assignment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} + */ + public static final class Rollout extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + RolloutOrBuilder { + private static final long serialVersionUID = 0L; + // Use Rollout.newBuilder() to construct. + private Rollout(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Rollout() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Rollout(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Rollout( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder subBuilder = null; + if (disruptionBudget_ != null) { + subBuilder = disruptionBudget_.toBuilder(); + } + disruptionBudget_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.FixedOrPercent.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(disruptionBudget_); + disruptionBudget_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (minWaitDuration_ != null) { + subBuilder = minWaitDuration_.toBuilder(); + } + minWaitDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minWaitDuration_); + minWaitDuration_ = 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder.class); + } + + public static final int DISRUPTION_BUDGET_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.FixedOrPercent disruptionBudget_; + /** + * + * + *
+     * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+     * any given moment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the disruptionBudget field is set. + */ + @java.lang.Override + public boolean hasDisruptionBudget() { + return disruptionBudget_ != null; + } + /** + * + * + *
+     * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+     * any given moment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The disruptionBudget. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.FixedOrPercent getDisruptionBudget() { + return disruptionBudget_ == null + ? com.google.cloud.osconfig.v1alpha.FixedOrPercent.getDefaultInstance() + : disruptionBudget_; + } + /** + * + * + *
+     * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+     * any given moment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder + getDisruptionBudgetOrBuilder() { + return getDisruptionBudget(); + } + + public static final int MIN_WAIT_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration minWaitDuration_; + /** + * + * + *
+     * Required. This determines the minimum duration of time to wait after the
+     * configuration changes are applied through the current rollout. A
+     * VM continues to count towards the `disruption_budget` at least
+     * until this duration of time has passed after configuration changes are
+     * applied.
+     * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the minWaitDuration field is set. + */ + @java.lang.Override + public boolean hasMinWaitDuration() { + return minWaitDuration_ != null; + } + /** + * + * + *
+     * Required. This determines the minimum duration of time to wait after the
+     * configuration changes are applied through the current rollout. A
+     * VM continues to count towards the `disruption_budget` at least
+     * until this duration of time has passed after configuration changes are
+     * applied.
+     * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The minWaitDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinWaitDuration() { + return minWaitDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minWaitDuration_; + } + /** + * + * + *
+     * Required. This determines the minimum duration of time to wait after the
+     * configuration changes are applied through the current rollout. A
+     * VM continues to count towards the `disruption_budget` at least
+     * until this duration of time has passed after configuration changes are
+     * applied.
+     * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinWaitDurationOrBuilder() { + return getMinWaitDuration(); + } + + 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 (disruptionBudget_ != null) { + output.writeMessage(1, getDisruptionBudget()); + } + if (minWaitDuration_ != null) { + output.writeMessage(2, getMinWaitDuration()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (disruptionBudget_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDisruptionBudget()); + } + if (minWaitDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMinWaitDuration()); + } + 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.v1alpha.OSPolicyAssignment.Rollout)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) obj; + + if (hasDisruptionBudget() != other.hasDisruptionBudget()) return false; + if (hasDisruptionBudget()) { + if (!getDisruptionBudget().equals(other.getDisruptionBudget())) return false; + } + if (hasMinWaitDuration() != other.hasMinWaitDuration()) return false; + if (hasMinWaitDuration()) { + if (!getMinWaitDuration().equals(other.getMinWaitDuration())) 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 (hasDisruptionBudget()) { + hash = (37 * hash) + DISRUPTION_BUDGET_FIELD_NUMBER; + hash = (53 * hash) + getDisruptionBudget().hashCode(); + } + if (hasMinWaitDuration()) { + hash = (37 * hash) + MIN_WAIT_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMinWaitDuration().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Message to configure the rollout at the zonal level for the OS policy
+     * assignment.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (disruptionBudgetBuilder_ == null) { + disruptionBudget_ = null; + } else { + disruptionBudget_ = null; + disruptionBudgetBuilder_ = null; + } + if (minWaitDurationBuilder_ == null) { + minWaitDuration_ = null; + } else { + minWaitDuration_ = null; + minWaitDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(this); + if (disruptionBudgetBuilder_ == null) { + result.disruptionBudget_ = disruptionBudget_; + } else { + result.disruptionBudget_ = disruptionBudgetBuilder_.build(); + } + if (minWaitDurationBuilder_ == null) { + result.minWaitDuration_ = minWaitDuration_; + } else { + result.minWaitDuration_ = minWaitDurationBuilder_.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.v1alpha.OSPolicyAssignment.Rollout) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.getDefaultInstance()) + return this; + if (other.hasDisruptionBudget()) { + mergeDisruptionBudget(other.getDisruptionBudget()); + } + if (other.hasMinWaitDuration()) { + mergeMinWaitDuration(other.getMinWaitDuration()); + } + 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.v1alpha.OSPolicyAssignment.Rollout parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1alpha.FixedOrPercent disruptionBudget_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.FixedOrPercent, + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder, + com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder> + disruptionBudgetBuilder_; + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the disruptionBudget field is set. + */ + public boolean hasDisruptionBudget() { + return disruptionBudgetBuilder_ != null || disruptionBudget_ != null; + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The disruptionBudget. + */ + public com.google.cloud.osconfig.v1alpha.FixedOrPercent getDisruptionBudget() { + if (disruptionBudgetBuilder_ == null) { + return disruptionBudget_ == null + ? com.google.cloud.osconfig.v1alpha.FixedOrPercent.getDefaultInstance() + : disruptionBudget_; + } else { + return disruptionBudgetBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDisruptionBudget(com.google.cloud.osconfig.v1alpha.FixedOrPercent value) { + if (disruptionBudgetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + disruptionBudget_ = value; + onChanged(); + } else { + disruptionBudgetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDisruptionBudget( + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder builderForValue) { + if (disruptionBudgetBuilder_ == null) { + disruptionBudget_ = builderForValue.build(); + onChanged(); + } else { + disruptionBudgetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDisruptionBudget(com.google.cloud.osconfig.v1alpha.FixedOrPercent value) { + if (disruptionBudgetBuilder_ == null) { + if (disruptionBudget_ != null) { + disruptionBudget_ = + com.google.cloud.osconfig.v1alpha.FixedOrPercent.newBuilder(disruptionBudget_) + .mergeFrom(value) + .buildPartial(); + } else { + disruptionBudget_ = value; + } + onChanged(); + } else { + disruptionBudgetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDisruptionBudget() { + if (disruptionBudgetBuilder_ == null) { + disruptionBudget_ = null; + onChanged(); + } else { + disruptionBudget_ = null; + disruptionBudgetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder getDisruptionBudgetBuilder() { + + onChanged(); + return getDisruptionBudgetFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder + getDisruptionBudgetOrBuilder() { + if (disruptionBudgetBuilder_ != null) { + return disruptionBudgetBuilder_.getMessageOrBuilder(); + } else { + return disruptionBudget_ == null + ? com.google.cloud.osconfig.v1alpha.FixedOrPercent.getDefaultInstance() + : disruptionBudget_; + } + } + /** + * + * + *
+       * Required. The maximum number (or percentage) of VMs per zone to disrupt at
+       * any given moment.
+       * 
+ * + * + * .google.cloud.osconfig.v1alpha.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.FixedOrPercent, + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder, + com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder> + getDisruptionBudgetFieldBuilder() { + if (disruptionBudgetBuilder_ == null) { + disruptionBudgetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.FixedOrPercent, + com.google.cloud.osconfig.v1alpha.FixedOrPercent.Builder, + com.google.cloud.osconfig.v1alpha.FixedOrPercentOrBuilder>( + getDisruptionBudget(), getParentForChildren(), isClean()); + disruptionBudget_ = null; + } + return disruptionBudgetBuilder_; + } + + private com.google.protobuf.Duration minWaitDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minWaitDurationBuilder_; + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the minWaitDuration field is set. + */ + public boolean hasMinWaitDuration() { + return minWaitDurationBuilder_ != null || minWaitDuration_ != null; + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The minWaitDuration. + */ + public com.google.protobuf.Duration getMinWaitDuration() { + if (minWaitDurationBuilder_ == null) { + return minWaitDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minWaitDuration_; + } else { + return minWaitDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMinWaitDuration(com.google.protobuf.Duration value) { + if (minWaitDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minWaitDuration_ = value; + onChanged(); + } else { + minWaitDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMinWaitDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (minWaitDurationBuilder_ == null) { + minWaitDuration_ = builderForValue.build(); + onChanged(); + } else { + minWaitDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMinWaitDuration(com.google.protobuf.Duration value) { + if (minWaitDurationBuilder_ == null) { + if (minWaitDuration_ != null) { + minWaitDuration_ = + com.google.protobuf.Duration.newBuilder(minWaitDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + minWaitDuration_ = value; + } + onChanged(); + } else { + minWaitDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMinWaitDuration() { + if (minWaitDurationBuilder_ == null) { + minWaitDuration_ = null; + onChanged(); + } else { + minWaitDuration_ = null; + minWaitDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getMinWaitDurationBuilder() { + + onChanged(); + return getMinWaitDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getMinWaitDurationOrBuilder() { + if (minWaitDurationBuilder_ != null) { + return minWaitDurationBuilder_.getMessageOrBuilder(); + } else { + return minWaitDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minWaitDuration_; + } + } + /** + * + * + *
+       * Required. This determines the minimum duration of time to wait after the
+       * configuration changes are applied through the current rollout. A
+       * VM continues to count towards the `disruption_budget` at least
+       * until this duration of time has passed after configuration changes are
+       * applied.
+       * 
+ * + * + * .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinWaitDurationFieldBuilder() { + if (minWaitDurationBuilder_ == null) { + minWaitDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinWaitDuration(), getParentForChildren(), isClean()); + minWaitDuration_ = null; + } + return minWaitDurationBuilder_; + } + + @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.v1alpha.OSPolicyAssignment.Rollout) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Rollout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Rollout(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+   * This field is ignored when you create an OS policy assignment.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+   * This field is ignored when you create an OS policy assignment.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * OS policy assignment description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * OS policy assignment description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_POLICIES_FIELD_NUMBER = 3; + private java.util.List osPolicies_; + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getOsPoliciesList() { + return osPolicies_; + } + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getOsPoliciesOrBuilderList() { + return osPolicies_; + } + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getOsPoliciesCount() { + return osPolicies_.size(); + } + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicy getOsPolicies(int index) { + return osPolicies_.get(index); + } + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder getOsPoliciesOrBuilder(int index) { + return osPolicies_.get(index); + } + + public static final int INSTANCE_FILTER_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instanceFilter_; + /** + * + * + *
+   * Required. Filter to select VMs.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + @java.lang.Override + public boolean hasInstanceFilter() { + return instanceFilter_ != null; + } + /** + * + * + *
+   * Required. Filter to select VMs.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+   * Required. Filter to select VMs.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int ROLLOUT_FIELD_NUMBER = 5; + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout_; + /** + * + * + *
+   * Required. Rollout to deploy the OS policy assignment.
+   * A rollout is triggered in the following situations:
+   * 1) OSPolicyAssignment is created.
+   * 2) OSPolicyAssignment is updated and the update contains changes to one of
+   * the following fields:
+   *    - instance_filter
+   *    - os_policies
+   * 3) OSPolicyAssignment is deleted.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+   * Required. Rollout to deploy the OS policy assignment.
+   * A rollout is triggered in the following situations:
+   * 1) OSPolicyAssignment is created.
+   * 2) OSPolicyAssignment is updated and the update contains changes to one of
+   * the following fields:
+   *    - instance_filter
+   *    - os_policies
+   * 3) OSPolicyAssignment is deleted.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout getRollout() { + return rollout_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.getDefaultInstance() + : rollout_; + } + /** + * + * + *
+   * Required. Rollout to deploy the OS policy assignment.
+   * A rollout is triggered in the following situations:
+   * 1) OSPolicyAssignment is created.
+   * 2) OSPolicyAssignment is updated and the update contains changes to one of
+   * the following fields:
+   *    - instance_filter
+   *    - os_policies
+   * 3) OSPolicyAssignment is deleted.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder + getRolloutOrBuilder() { + return getRollout(); + } + + public static final int REVISION_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object revisionId_; + /** + * + * + *
+   * Output only. The assignment revision ID
+   * A new revision is committed whenever a rollout is triggered for a OS policy
+   * assignment
+   * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The assignment revision ID
+   * A new revision is committed whenever a rollout is triggered for a OS policy
+   * assignment
+   * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp revisionCreateTime_; + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the revisionCreateTime field is set. + */ + @java.lang.Override + public boolean hasRevisionCreateTime() { + return revisionCreateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The revisionCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRevisionCreateTime() { + return revisionCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : revisionCreateTime_; + } + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { + return getRevisionCreateTime(); + } + + public static final int ROLLOUT_STATE_FIELD_NUMBER = 9; + private int rolloutState_; + /** + * + * + *
+   * Output only. OS policy assignment rollout state
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for rolloutState. + */ + @java.lang.Override + public int getRolloutStateValue() { + return rolloutState_; + } + /** + * + * + *
+   * Output only. OS policy assignment rollout state
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rolloutState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState getRolloutState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState.valueOf(rolloutState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState.UNRECOGNIZED + : result; + } + + public static final int BASELINE_FIELD_NUMBER = 10; + private boolean baseline_; + /** + * + * + *
+   * Output only. Indicates that this revision has been successfully rolled out in this zone
+   * and new VMs will be assigned OS policies from this revision.
+   * For a given OS policy assignment, there is only one revision with a value
+   * of `true` for this field.
+   * 
+ * + * bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The baseline. + */ + @java.lang.Override + public boolean getBaseline() { + return baseline_; + } + + public static final int DELETED_FIELD_NUMBER = 11; + private boolean deleted_; + /** + * + * + *
+   * Output only. Indicates that this revision deletes the OS policy assignment.
+   * 
+ * + * bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + + public static final int RECONCILING_FIELD_NUMBER = 12; + private boolean reconciling_; + /** + * + * + *
+   * Output only. Indicates that reconciliation is in progress for the revision.
+   * This value is `true` when the `rollout_state` is one of:
+   * * IN_PROGRESS
+   * * CANCELLING
+   * 
+ * + * bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int UID_FIELD_NUMBER = 13; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. Server generated unique id for the OS policy assignment resource.
+   * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Server generated unique id for the OS policy assignment resource.
+   * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = 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_); + } + for (int i = 0; i < osPolicies_.size(); i++) { + output.writeMessage(3, osPolicies_.get(i)); + } + if (instanceFilter_ != null) { + output.writeMessage(4, getInstanceFilter()); + } + if (rollout_ != null) { + output.writeMessage(5, getRollout()); + } + if (!getRevisionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, revisionId_); + } + if (revisionCreateTime_ != null) { + output.writeMessage(7, getRevisionCreateTime()); + } + if (rolloutState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState + .ROLLOUT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, rolloutState_); + } + if (baseline_ != false) { + output.writeBool(10, baseline_); + } + if (deleted_ != false) { + output.writeBool(11, deleted_); + } + if (reconciling_ != false) { + output.writeBool(12, reconciling_); + } + if (!getUidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, uid_); + } + 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_); + } + for (int i = 0; i < osPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, osPolicies_.get(i)); + } + if (instanceFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInstanceFilter()); + } + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRollout()); + } + if (!getRevisionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, revisionId_); + } + if (revisionCreateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRevisionCreateTime()); + } + if (rolloutState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState + .ROLLOUT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, rolloutState_); + } + if (baseline_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, baseline_); + } + if (deleted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, deleted_); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, reconciling_); + } + if (!getUidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, uid_); + } + 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.v1alpha.OSPolicyAssignment)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getOsPoliciesList().equals(other.getOsPoliciesList())) return false; + if (hasInstanceFilter() != other.hasInstanceFilter()) return false; + if (hasInstanceFilter()) { + if (!getInstanceFilter().equals(other.getInstanceFilter())) return false; + } + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } + if (!getRevisionId().equals(other.getRevisionId())) return false; + if (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; + if (hasRevisionCreateTime()) { + if (!getRevisionCreateTime().equals(other.getRevisionCreateTime())) return false; + } + if (rolloutState_ != other.rolloutState_) return false; + if (getBaseline() != other.getBaseline()) return false; + if (getDeleted() != other.getDeleted()) return false; + if (getReconciling() != other.getReconciling()) return false; + if (!getUid().equals(other.getUid())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getOsPoliciesCount() > 0) { + hash = (37 * hash) + OS_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getOsPoliciesList().hashCode(); + } + if (hasInstanceFilter()) { + hash = (37 * hash) + INSTANCE_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceFilter().hashCode(); + } + if (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + if (hasRevisionCreateTime()) { + hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRevisionCreateTime().hashCode(); + } + hash = (37 * hash) + ROLLOUT_STATE_FIELD_NUMBER; + hash = (53 * hash) + rolloutState_; + hash = (37 * hash) + BASELINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBaseline()); + hash = (37 * hash) + DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeleted()); + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment 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.v1alpha.OSPolicyAssignment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment 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.v1alpha.OSPolicyAssignment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment 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.v1alpha.OSPolicyAssignment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment 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.v1alpha.OSPolicyAssignment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment 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.v1alpha.OSPolicyAssignment 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; + } + /** + * + * + *
+   * OS policy assignment is an API resource that is used to
+   * apply a set of OS policies to a dynamically targeted group of Compute Engine
+   * VM instances.
+   * An OS policy is used to define the desired state configuration for a
+   * Compute Engine VM instance through a set of configuration resources that
+   * provide capabilities such as installing or removing software packages, or
+   * executing a script.
+   * For more information, see [OS policy and OS policy
+   * assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignment) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOsPoliciesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (osPoliciesBuilder_ == null) { + osPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + osPoliciesBuilder_.clear(); + } + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + if (rolloutBuilder_ == null) { + rollout_ = null; + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + revisionId_ = ""; + + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = null; + } else { + revisionCreateTime_ = null; + revisionCreateTimeBuilder_ = null; + } + rolloutState_ = 0; + + baseline_ = false; + + deleted_ = false; + + reconciling_ = false; + + uid_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (osPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + osPolicies_ = java.util.Collections.unmodifiableList(osPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.osPolicies_ = osPolicies_; + } else { + result.osPolicies_ = osPoliciesBuilder_.build(); + } + if (instanceFilterBuilder_ == null) { + result.instanceFilter_ = instanceFilter_; + } else { + result.instanceFilter_ = instanceFilterBuilder_.build(); + } + if (rolloutBuilder_ == null) { + result.rollout_ = rollout_; + } else { + result.rollout_ = rolloutBuilder_.build(); + } + result.revisionId_ = revisionId_; + if (revisionCreateTimeBuilder_ == null) { + result.revisionCreateTime_ = revisionCreateTime_; + } else { + result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); + } + result.rolloutState_ = rolloutState_; + result.baseline_ = baseline_; + result.deleted_ = deleted_; + result.reconciling_ = reconciling_; + result.uid_ = uid_; + 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.v1alpha.OSPolicyAssignment) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicyAssignment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicyAssignment other) { + if (other == com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (osPoliciesBuilder_ == null) { + if (!other.osPolicies_.isEmpty()) { + if (osPolicies_.isEmpty()) { + osPolicies_ = other.osPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOsPoliciesIsMutable(); + osPolicies_.addAll(other.osPolicies_); + } + onChanged(); + } + } else { + if (!other.osPolicies_.isEmpty()) { + if (osPoliciesBuilder_.isEmpty()) { + osPoliciesBuilder_.dispose(); + osPoliciesBuilder_ = null; + osPolicies_ = other.osPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + osPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsPoliciesFieldBuilder() + : null; + } else { + osPoliciesBuilder_.addAllMessages(other.osPolicies_); + } + } + } + if (other.hasInstanceFilter()) { + mergeInstanceFilter(other.getInstanceFilter()); + } + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + onChanged(); + } + if (other.hasRevisionCreateTime()) { + mergeRevisionCreateTime(other.getRevisionCreateTime()); + } + if (other.rolloutState_ != 0) { + setRolloutStateValue(other.getRolloutStateValue()); + } + if (other.getBaseline() != false) { + setBaseline(other.getBaseline()); + } + if (other.getDeleted() != false) { + setDeleted(other.getDeleted()); + } + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + 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.v1alpha.OSPolicyAssignment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+     * This field is ignored when you create an OS policy assignment.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+     * This field is ignored when you create an OS policy assignment.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+     * This field is ignored when you create an OS policy assignment.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+     * This field is ignored when you create an OS policy assignment.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+     * This field is ignored when you create an OS policy assignment.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+     * OS policy assignment description.
+     * 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; + } + } + /** + * + * + *
+     * OS policy assignment description.
+     * 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; + } + } + /** + * + * + *
+     * OS policy assignment description.
+     * 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; + } + /** + * + * + *
+     * OS policy assignment description.
+     * 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; + } + /** + * + * + *
+     * OS policy assignment description.
+     * 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 java.util.List osPolicies_ = + java.util.Collections.emptyList(); + + private void ensureOsPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + osPolicies_ = + new java.util.ArrayList(osPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy, + com.google.cloud.osconfig.v1alpha.OSPolicy.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder> + osPoliciesBuilder_; + + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getOsPoliciesList() { + if (osPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(osPolicies_); + } else { + return osPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getOsPoliciesCount() { + if (osPoliciesBuilder_ == null) { + return osPolicies_.size(); + } else { + return osPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy getOsPolicies(int index) { + if (osPoliciesBuilder_ == null) { + return osPolicies_.get(index); + } else { + return osPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOsPolicies(int index, com.google.cloud.osconfig.v1alpha.OSPolicy value) { + if (osPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPoliciesIsMutable(); + osPolicies_.set(index, value); + onChanged(); + } else { + osPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOsPolicies( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.Builder builderForValue) { + if (osPoliciesBuilder_ == null) { + ensureOsPoliciesIsMutable(); + osPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + osPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOsPolicies(com.google.cloud.osconfig.v1alpha.OSPolicy value) { + if (osPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPoliciesIsMutable(); + osPolicies_.add(value); + onChanged(); + } else { + osPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOsPolicies(int index, com.google.cloud.osconfig.v1alpha.OSPolicy value) { + if (osPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsPoliciesIsMutable(); + osPolicies_.add(index, value); + onChanged(); + } else { + osPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOsPolicies( + com.google.cloud.osconfig.v1alpha.OSPolicy.Builder builderForValue) { + if (osPoliciesBuilder_ == null) { + ensureOsPoliciesIsMutable(); + osPolicies_.add(builderForValue.build()); + onChanged(); + } else { + osPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addOsPolicies( + int index, com.google.cloud.osconfig.v1alpha.OSPolicy.Builder builderForValue) { + if (osPoliciesBuilder_ == null) { + ensureOsPoliciesIsMutable(); + osPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + osPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllOsPolicies( + java.lang.Iterable values) { + if (osPoliciesBuilder_ == null) { + ensureOsPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osPolicies_); + onChanged(); + } else { + osPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOsPolicies() { + if (osPoliciesBuilder_ == null) { + osPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + osPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeOsPolicies(int index) { + if (osPoliciesBuilder_ == null) { + ensureOsPoliciesIsMutable(); + osPolicies_.remove(index); + onChanged(); + } else { + osPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Builder getOsPoliciesBuilder(int index) { + return getOsPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder getOsPoliciesOrBuilder(int index) { + if (osPoliciesBuilder_ == null) { + return osPolicies_.get(index); + } else { + return osPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getOsPoliciesOrBuilderList() { + if (osPoliciesBuilder_ != null) { + return osPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osPolicies_); + } + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Builder addOsPoliciesBuilder() { + return getOsPoliciesFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1alpha.OSPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicy.Builder addOsPoliciesBuilder(int index) { + return getOsPoliciesFieldBuilder() + .addBuilder(index, com.google.cloud.osconfig.v1alpha.OSPolicy.getDefaultInstance()); + } + /** + * + * + *
+     * Required. List of OS policies to be applied to the VMs.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getOsPoliciesBuilderList() { + return getOsPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy, + com.google.cloud.osconfig.v1alpha.OSPolicy.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder> + getOsPoliciesFieldBuilder() { + if (osPoliciesBuilder_ == null) { + osPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicy, + com.google.cloud.osconfig.v1alpha.OSPolicy.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder>( + osPolicies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + osPolicies_ = null; + } + return osPoliciesBuilder_; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + public boolean hasInstanceFilter() { + return instanceFilterBuilder_ != null || instanceFilter_ != null; + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .getDefaultInstance() + : instanceFilter_; + } else { + return instanceFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceFilter_ = value; + onChanged(); + } else { + instanceFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder + builderForValue) { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = builderForValue.build(); + onChanged(); + } else { + instanceFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.newBuilder( + instanceFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceFilter_ = value; + } + onChanged(); + } else { + instanceFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInstanceFilter() { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = null; + onChanged(); + } else { + instanceFilter_ = null; + instanceFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder + getInstanceFilterBuilder() { + + onChanged(); + return getInstanceFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter + .getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+     * Required. Filter to select VMs.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return rolloutBuilder_ != null || rollout_ != null; + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollout(com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + onChanged(); + } else { + rolloutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollout( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + onChanged(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRollout( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout value) { + if (rolloutBuilder_ == null) { + if (rollout_ != null) { + rollout_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.newBuilder(rollout_) + .mergeFrom(value) + .buildPartial(); + } else { + rollout_ = value; + } + onChanged(); + } else { + rolloutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRollout() { + if (rolloutBuilder_ == null) { + rollout_ = null; + onChanged(); + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder + getRolloutBuilder() { + + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder + getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+     * Required. Rollout to deploy the OS policy assignment.
+     * A rollout is triggered in the following situations:
+     * 1) OSPolicyAssignment is created.
+     * 2) OSPolicyAssignment is updated and the update contains changes to one of
+     * the following fields:
+     *    - instance_filter
+     *    - os_policies
+     * 3) OSPolicyAssignment is deleted.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + + private java.lang.Object revisionId_ = ""; + /** + * + * + *
+     * Output only. The assignment revision ID
+     * A new revision is committed whenever a rollout is triggered for a OS policy
+     * assignment
+     * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The assignment revision ID
+     * A new revision is committed whenever a rollout is triggered for a OS policy
+     * assignment
+     * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The assignment revision ID
+     * A new revision is committed whenever a rollout is triggered for a OS policy
+     * assignment
+     * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + revisionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The assignment revision ID
+     * A new revision is committed whenever a rollout is triggered for a OS policy
+     * assignment
+     * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + + revisionId_ = getDefaultInstance().getRevisionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The assignment revision ID
+     * A new revision is committed whenever a rollout is triggered for a OS policy
+     * assignment
+     * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + revisionId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp revisionCreateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + revisionCreateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the revisionCreateTime field is set. + */ + public boolean hasRevisionCreateTime() { + return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The revisionCreateTime. + */ + public com.google.protobuf.Timestamp getRevisionCreateTime() { + if (revisionCreateTimeBuilder_ == null) { + return revisionCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : revisionCreateTime_; + } else { + return revisionCreateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { + if (revisionCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + revisionCreateTime_ = value; + onChanged(); + } else { + revisionCreateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = builderForValue.build(); + onChanged(); + } else { + revisionCreateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { + if (revisionCreateTimeBuilder_ == null) { + if (revisionCreateTime_ != null) { + revisionCreateTime_ = + com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + revisionCreateTime_ = value; + } + onChanged(); + } else { + revisionCreateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRevisionCreateTime() { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTime_ = null; + onChanged(); + } else { + revisionCreateTime_ = null; + revisionCreateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { + + onChanged(); + return getRevisionCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { + if (revisionCreateTimeBuilder_ != null) { + return revisionCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return revisionCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : revisionCreateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRevisionCreateTimeFieldBuilder() { + if (revisionCreateTimeBuilder_ == null) { + revisionCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRevisionCreateTime(), getParentForChildren(), isClean()); + revisionCreateTime_ = null; + } + return revisionCreateTimeBuilder_; + } + + private int rolloutState_ = 0; + /** + * + * + *
+     * Output only. OS policy assignment rollout state
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for rolloutState. + */ + @java.lang.Override + public int getRolloutStateValue() { + return rolloutState_; + } + /** + * + * + *
+     * Output only. OS policy assignment rollout state
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for rolloutState to set. + * @return This builder for chaining. + */ + public Builder setRolloutStateValue(int value) { + + rolloutState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. OS policy assignment rollout state
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rolloutState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState getRolloutState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState.valueOf(rolloutState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. OS policy assignment rollout state
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The rolloutState to set. + * @return This builder for chaining. + */ + public Builder setRolloutState( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. OS policy assignment rollout state
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRolloutState() { + + rolloutState_ = 0; + onChanged(); + return this; + } + + private boolean baseline_; + /** + * + * + *
+     * Output only. Indicates that this revision has been successfully rolled out in this zone
+     * and new VMs will be assigned OS policies from this revision.
+     * For a given OS policy assignment, there is only one revision with a value
+     * of `true` for this field.
+     * 
+ * + * bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The baseline. + */ + @java.lang.Override + public boolean getBaseline() { + return baseline_; + } + /** + * + * + *
+     * Output only. Indicates that this revision has been successfully rolled out in this zone
+     * and new VMs will be assigned OS policies from this revision.
+     * For a given OS policy assignment, there is only one revision with a value
+     * of `true` for this field.
+     * 
+ * + * bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The baseline to set. + * @return This builder for chaining. + */ + public Builder setBaseline(boolean value) { + + baseline_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates that this revision has been successfully rolled out in this zone
+     * and new VMs will be assigned OS policies from this revision.
+     * For a given OS policy assignment, there is only one revision with a value
+     * of `true` for this field.
+     * 
+ * + * bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBaseline() { + + baseline_ = false; + onChanged(); + return this; + } + + private boolean deleted_; + /** + * + * + *
+     * Output only. Indicates that this revision deletes the OS policy assignment.
+     * 
+ * + * bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + /** + * + * + *
+     * Output only. Indicates that this revision deletes the OS policy assignment.
+     * 
+ * + * bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deleted to set. + * @return This builder for chaining. + */ + public Builder setDeleted(boolean value) { + + deleted_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates that this revision deletes the OS policy assignment.
+     * 
+ * + * bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeleted() { + + deleted_ = false; + onChanged(); + return this; + } + + private boolean reconciling_; + /** + * + * + *
+     * Output only. Indicates that reconciliation is in progress for the revision.
+     * This value is `true` when the `rollout_state` is one of:
+     * * IN_PROGRESS
+     * * CANCELLING
+     * 
+ * + * bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + /** + * + * + *
+     * Output only. Indicates that reconciliation is in progress for the revision.
+     * This value is `true` when the `rollout_state` is one of:
+     * * IN_PROGRESS
+     * * CANCELLING
+     * 
+ * + * bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates that reconciliation is in progress for the revision.
+     * This value is `true` when the `rollout_state` is one of:
+     * * IN_PROGRESS
+     * * CANCELLING
+     * 
+ * + * bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + + reconciling_ = false; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. Server generated unique id for the OS policy assignment resource.
+     * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Server generated unique id for the OS policy assignment resource.
+     * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Server generated unique id for the OS policy assignment resource.
+     * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server generated unique id for the OS policy assignment resource.
+     * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Server generated unique id for the OS policy assignment resource.
+     * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = 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.v1alpha.OSPolicyAssignment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignment) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyAssignment(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyAssignment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyAssignment(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.v1alpha.OSPolicyAssignment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentName.java new file mode 100644 index 00000000..80fb4534 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentName.java @@ -0,0 +1,231 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OSPolicyAssignmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_OS_POLICY_ASSIGNMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String osPolicyAssignment; + + @Deprecated + protected OSPolicyAssignmentName() { + project = null; + location = null; + osPolicyAssignment = null; + } + + private OSPolicyAssignmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + osPolicyAssignment = Preconditions.checkNotNull(builder.getOsPolicyAssignment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOsPolicyAssignment() { + return osPolicyAssignment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OSPolicyAssignmentName of( + String project, String location, String osPolicyAssignment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOsPolicyAssignment(osPolicyAssignment) + .build(); + } + + public static String format(String project, String location, String osPolicyAssignment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setOsPolicyAssignment(osPolicyAssignment) + .build() + .toString(); + } + + public static OSPolicyAssignmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_OS_POLICY_ASSIGNMENT.validatedMatch( + formattedString, "OSPolicyAssignmentName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("os_policy_assignment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OSPolicyAssignmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_OS_POLICY_ASSIGNMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (osPolicyAssignment != null) { + fieldMapBuilder.put("os_policy_assignment", osPolicyAssignment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_OS_POLICY_ASSIGNMENT.instantiate( + "project", project, "location", location, "os_policy_assignment", osPolicyAssignment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OSPolicyAssignmentName that = ((OSPolicyAssignmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.osPolicyAssignment, that.osPolicyAssignment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(osPolicyAssignment); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}. + */ + public static class Builder { + private String project; + private String location; + private String osPolicyAssignment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getOsPolicyAssignment() { + return osPolicyAssignment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setOsPolicyAssignment(String osPolicyAssignment) { + this.osPolicyAssignment = osPolicyAssignment; + return this; + } + + private Builder(OSPolicyAssignmentName oSPolicyAssignmentName) { + project = oSPolicyAssignmentName.project; + location = oSPolicyAssignmentName.location; + osPolicyAssignment = oSPolicyAssignmentName.osPolicyAssignment; + } + + public OSPolicyAssignmentName build() { + return new OSPolicyAssignmentName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java new file mode 100644 index 00000000..79fe34ef --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadata.java @@ -0,0 +1,1966 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * OS policy assignment operation metadata provided by OS policy assignment API
+ * methods that return long running operations.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} + */ +public final class OSPolicyAssignmentOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + OSPolicyAssignmentOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyAssignmentOperationMetadata.newBuilder() to construct. + private OSPolicyAssignmentOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyAssignmentOperationMetadata() { + osPolicyAssignment_ = ""; + apiMethod_ = 0; + rolloutState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyAssignmentOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyAssignmentOperationMetadata( + 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(); + + osPolicyAssignment_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + apiMethod_ = rawValue; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + rolloutState_ = rawValue; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (rolloutStartTime_ != null) { + subBuilder = rolloutStartTime_.toBuilder(); + } + rolloutStartTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rolloutStartTime_); + rolloutStartTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (rolloutUpdateTime_ != null) { + subBuilder = rolloutUpdateTime_.toBuilder(); + } + rolloutUpdateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rolloutUpdateTime_); + rolloutUpdateTime_ = 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.Builder.class); + } + + /** + * + * + *
+   * The OS policy assignment API method.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod} + */ + public enum APIMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value
+     * 
+ * + * API_METHOD_UNSPECIFIED = 0; + */ + API_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * Create OS policy assignment API method
+     * 
+ * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
+     * Update OS policy assignment API method
+     * 
+ * + * UPDATE = 2; + */ + UPDATE(2), + /** + * + * + *
+     * Delete OS policy assignment API method
+     * 
+ * + * DELETE = 3; + */ + DELETE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value
+     * 
+ * + * API_METHOD_UNSPECIFIED = 0; + */ + public static final int API_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Create OS policy assignment API method
+     * 
+ * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * + * + *
+     * Update OS policy assignment API method
+     * 
+ * + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * + * + *
+     * Delete OS policy assignment API method
+     * 
+ * + * DELETE = 3; + */ + public static final int DELETE_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 APIMethod 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 APIMethod forNumber(int value) { + switch (value) { + case 0: + return API_METHOD_UNSPECIFIED; + case 1: + return CREATE; + case 2: + return UPDATE; + case 3: + return DELETE; + 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 APIMethod findValueByNumber(int number) { + return APIMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final APIMethod[] VALUES = values(); + + public static APIMethod 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 APIMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod) + } + + /** + * + * + *
+   * State of the rollout
+   * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState} + */ + public enum RolloutState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Invalid value
+     * 
+ * + * ROLLOUT_STATE_UNSPECIFIED = 0; + */ + ROLLOUT_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The rollout is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+     * The rollout is being cancelled.
+     * 
+ * + * CANCELLING = 2; + */ + CANCELLING(2), + /** + * + * + *
+     * The rollout is cancelled.
+     * 
+ * + * CANCELLED = 3; + */ + CANCELLED(3), + /** + * + * + *
+     * The rollout has completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Invalid value
+     * 
+ * + * ROLLOUT_STATE_UNSPECIFIED = 0; + */ + public static final int ROLLOUT_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The rollout is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+     * The rollout is being cancelled.
+     * 
+ * + * CANCELLING = 2; + */ + public static final int CANCELLING_VALUE = 2; + /** + * + * + *
+     * The rollout is cancelled.
+     * 
+ * + * CANCELLED = 3; + */ + public static final int CANCELLED_VALUE = 3; + /** + * + * + *
+     * The rollout has completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RolloutState 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 RolloutState forNumber(int value) { + switch (value) { + case 0: + return ROLLOUT_STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return CANCELLING; + case 3: + return CANCELLED; + case 4: + return SUCCEEDED; + 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 RolloutState findValueByNumber(int number) { + return RolloutState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final RolloutState[] VALUES = values(); + + public static RolloutState 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 RolloutState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState) + } + + public static final int OS_POLICY_ASSIGNMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object osPolicyAssignment_; + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + @java.lang.Override + public java.lang.String getOsPolicyAssignment() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignment_ = s; + return s; + } + } + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyAssignmentBytes() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_METHOD_FIELD_NUMBER = 2; + private int apiMethod_; + /** + * + * + *
+   * The OS policy assignment API method.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return The enum numeric value on the wire for apiMethod. + */ + @java.lang.Override + public int getApiMethodValue() { + return apiMethod_; + } + /** + * + * + *
+   * The OS policy assignment API method.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return The apiMethod. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + getApiMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod.valueOf( + apiMethod_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + .UNRECOGNIZED + : result; + } + + public static final int ROLLOUT_STATE_FIELD_NUMBER = 3; + private int rolloutState_; + /** + * + * + *
+   * State of the rollout
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return The enum numeric value on the wire for rolloutState. + */ + @java.lang.Override + public int getRolloutStateValue() { + return rolloutState_; + } + /** + * + * + *
+   * State of the rollout
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return The rolloutState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + getRolloutState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState.valueOf( + rolloutState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + .UNRECOGNIZED + : result; + } + + public static final int ROLLOUT_START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp rolloutStartTime_; + /** + * + * + *
+   * Rollout start time
+   * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + * + * @return Whether the rolloutStartTime field is set. + */ + @java.lang.Override + public boolean hasRolloutStartTime() { + return rolloutStartTime_ != null; + } + /** + * + * + *
+   * Rollout start time
+   * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + * + * @return The rolloutStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRolloutStartTime() { + return rolloutStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rolloutStartTime_; + } + /** + * + * + *
+   * Rollout start time
+   * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRolloutStartTimeOrBuilder() { + return getRolloutStartTime(); + } + + public static final int ROLLOUT_UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp rolloutUpdateTime_; + /** + * + * + *
+   * Rollout update time
+   * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + * + * @return Whether the rolloutUpdateTime field is set. + */ + @java.lang.Override + public boolean hasRolloutUpdateTime() { + return rolloutUpdateTime_ != null; + } + /** + * + * + *
+   * Rollout update time
+   * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + * + * @return The rolloutUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRolloutUpdateTime() { + return rolloutUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rolloutUpdateTime_; + } + /** + * + * + *
+   * Rollout update time
+   * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRolloutUpdateTimeOrBuilder() { + return getRolloutUpdateTime(); + } + + 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 (!getOsPolicyAssignmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osPolicyAssignment_); + } + if (apiMethod_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + .API_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, apiMethod_); + } + if (rolloutState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + .ROLLOUT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, rolloutState_); + } + if (rolloutStartTime_ != null) { + output.writeMessage(4, getRolloutStartTime()); + } + if (rolloutUpdateTime_ != null) { + output.writeMessage(5, getRolloutUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOsPolicyAssignmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osPolicyAssignment_); + } + if (apiMethod_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + .API_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, apiMethod_); + } + if (rolloutState_ + != com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + .ROLLOUT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, rolloutState_); + } + if (rolloutStartTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRolloutStartTime()); + } + if (rolloutUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRolloutUpdateTime()); + } + 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.v1alpha.OSPolicyAssignmentOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata other = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) obj; + + if (!getOsPolicyAssignment().equals(other.getOsPolicyAssignment())) return false; + if (apiMethod_ != other.apiMethod_) return false; + if (rolloutState_ != other.rolloutState_) return false; + if (hasRolloutStartTime() != other.hasRolloutStartTime()) return false; + if (hasRolloutStartTime()) { + if (!getRolloutStartTime().equals(other.getRolloutStartTime())) return false; + } + if (hasRolloutUpdateTime() != other.hasRolloutUpdateTime()) return false; + if (hasRolloutUpdateTime()) { + if (!getRolloutUpdateTime().equals(other.getRolloutUpdateTime())) 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) + OS_POLICY_ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignment().hashCode(); + hash = (37 * hash) + API_METHOD_FIELD_NUMBER; + hash = (53 * hash) + apiMethod_; + hash = (37 * hash) + ROLLOUT_STATE_FIELD_NUMBER; + hash = (53 * hash) + rolloutState_; + if (hasRolloutStartTime()) { + hash = (37 * hash) + ROLLOUT_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRolloutStartTime().hashCode(); + } + if (hasRolloutUpdateTime()) { + hash = (37 * hash) + ROLLOUT_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRolloutUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata 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.v1alpha.OSPolicyAssignmentOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata 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.v1alpha.OSPolicyAssignmentOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata 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.v1alpha.OSPolicyAssignmentOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + 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.v1alpha.OSPolicyAssignmentOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata 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.v1alpha.OSPolicyAssignmentOperationMetadata 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; + } + /** + * + * + *
+   * OS policy assignment operation metadata provided by OS policy assignment API
+   * methods that return long running operations.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.class, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.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(); + osPolicyAssignment_ = ""; + + apiMethod_ = 0; + + rolloutState_ = 0; + + if (rolloutStartTimeBuilder_ == null) { + rolloutStartTime_ = null; + } else { + rolloutStartTime_ = null; + rolloutStartTimeBuilder_ = null; + } + if (rolloutUpdateTimeBuilder_ == null) { + rolloutUpdateTime_ = null; + } else { + rolloutUpdateTime_ = null; + rolloutUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata build() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata result = + new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(this); + result.osPolicyAssignment_ = osPolicyAssignment_; + result.apiMethod_ = apiMethod_; + result.rolloutState_ = rolloutState_; + if (rolloutStartTimeBuilder_ == null) { + result.rolloutStartTime_ = rolloutStartTime_; + } else { + result.rolloutStartTime_ = rolloutStartTimeBuilder_.build(); + } + if (rolloutUpdateTimeBuilder_ == null) { + result.rolloutUpdateTime_ = rolloutUpdateTime_; + } else { + result.rolloutUpdateTime_ = rolloutUpdateTimeBuilder_.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.v1alpha.OSPolicyAssignmentOperationMetadata) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + .getDefaultInstance()) return this; + if (!other.getOsPolicyAssignment().isEmpty()) { + osPolicyAssignment_ = other.osPolicyAssignment_; + onChanged(); + } + if (other.apiMethod_ != 0) { + setApiMethodValue(other.getApiMethodValue()); + } + if (other.rolloutState_ != 0) { + setRolloutStateValue(other.getRolloutStateValue()); + } + if (other.hasRolloutStartTime()) { + mergeRolloutStartTime(other.getRolloutStartTime()); + } + if (other.hasRolloutUpdateTime()) { + mergeRolloutUpdateTime(other.getRolloutUpdateTime()); + } + 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.v1alpha.OSPolicyAssignmentOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object osPolicyAssignment_ = ""; + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + public java.lang.String getOsPolicyAssignment() { + java.lang.Object ref = osPolicyAssignment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyAssignment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + public com.google.protobuf.ByteString getOsPolicyAssignmentBytes() { + java.lang.Object ref = osPolicyAssignment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyAssignment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The osPolicyAssignment to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyAssignment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyAssignment() { + + osPolicyAssignment_ = getDefaultInstance().getOsPolicyAssignment(); + onChanged(); + return this; + } + /** + * + * + *
+     * Reference to the `OSPolicyAssignment` API resource.
+     * Format:
+     * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+     * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for osPolicyAssignment to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyAssignmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyAssignment_ = value; + onChanged(); + return this; + } + + private int apiMethod_ = 0; + /** + * + * + *
+     * The OS policy assignment API method.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return The enum numeric value on the wire for apiMethod. + */ + @java.lang.Override + public int getApiMethodValue() { + return apiMethod_; + } + /** + * + * + *
+     * The OS policy assignment API method.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @param value The enum numeric value on the wire for apiMethod to set. + * @return This builder for chaining. + */ + public Builder setApiMethodValue(int value) { + + apiMethod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The OS policy assignment API method.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return The apiMethod. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + getApiMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod.valueOf( + apiMethod_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The OS policy assignment API method.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @param value The apiMethod to set. + * @return This builder for chaining. + */ + public Builder setApiMethod( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + apiMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The OS policy assignment API method.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearApiMethod() { + + apiMethod_ = 0; + onChanged(); + return this; + } + + private int rolloutState_ = 0; + /** + * + * + *
+     * State of the rollout
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return The enum numeric value on the wire for rolloutState. + */ + @java.lang.Override + public int getRolloutStateValue() { + return rolloutState_; + } + /** + * + * + *
+     * State of the rollout
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @param value The enum numeric value on the wire for rolloutState to set. + * @return This builder for chaining. + */ + public Builder setRolloutStateValue(int value) { + + rolloutState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * State of the rollout
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return The rolloutState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + getRolloutState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState result = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + .valueOf(rolloutState_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * State of the rollout
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @param value The rolloutState to set. + * @return This builder for chaining. + */ + public Builder setRolloutState( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * State of the rollout
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearRolloutState() { + + rolloutState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp rolloutStartTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rolloutStartTimeBuilder_; + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + * + * @return Whether the rolloutStartTime field is set. + */ + public boolean hasRolloutStartTime() { + return rolloutStartTimeBuilder_ != null || rolloutStartTime_ != null; + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + * + * @return The rolloutStartTime. + */ + public com.google.protobuf.Timestamp getRolloutStartTime() { + if (rolloutStartTimeBuilder_ == null) { + return rolloutStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rolloutStartTime_; + } else { + return rolloutStartTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + public Builder setRolloutStartTime(com.google.protobuf.Timestamp value) { + if (rolloutStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rolloutStartTime_ = value; + onChanged(); + } else { + rolloutStartTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + public Builder setRolloutStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (rolloutStartTimeBuilder_ == null) { + rolloutStartTime_ = builderForValue.build(); + onChanged(); + } else { + rolloutStartTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + public Builder mergeRolloutStartTime(com.google.protobuf.Timestamp value) { + if (rolloutStartTimeBuilder_ == null) { + if (rolloutStartTime_ != null) { + rolloutStartTime_ = + com.google.protobuf.Timestamp.newBuilder(rolloutStartTime_) + .mergeFrom(value) + .buildPartial(); + } else { + rolloutStartTime_ = value; + } + onChanged(); + } else { + rolloutStartTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + public Builder clearRolloutStartTime() { + if (rolloutStartTimeBuilder_ == null) { + rolloutStartTime_ = null; + onChanged(); + } else { + rolloutStartTime_ = null; + rolloutStartTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getRolloutStartTimeBuilder() { + + onChanged(); + return getRolloutStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getRolloutStartTimeOrBuilder() { + if (rolloutStartTimeBuilder_ != null) { + return rolloutStartTimeBuilder_.getMessageOrBuilder(); + } else { + return rolloutStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rolloutStartTime_; + } + } + /** + * + * + *
+     * Rollout start time
+     * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRolloutStartTimeFieldBuilder() { + if (rolloutStartTimeBuilder_ == null) { + rolloutStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRolloutStartTime(), getParentForChildren(), isClean()); + rolloutStartTime_ = null; + } + return rolloutStartTimeBuilder_; + } + + private com.google.protobuf.Timestamp rolloutUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + rolloutUpdateTimeBuilder_; + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + * + * @return Whether the rolloutUpdateTime field is set. + */ + public boolean hasRolloutUpdateTime() { + return rolloutUpdateTimeBuilder_ != null || rolloutUpdateTime_ != null; + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + * + * @return The rolloutUpdateTime. + */ + public com.google.protobuf.Timestamp getRolloutUpdateTime() { + if (rolloutUpdateTimeBuilder_ == null) { + return rolloutUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rolloutUpdateTime_; + } else { + return rolloutUpdateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + public Builder setRolloutUpdateTime(com.google.protobuf.Timestamp value) { + if (rolloutUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rolloutUpdateTime_ = value; + onChanged(); + } else { + rolloutUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + public Builder setRolloutUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (rolloutUpdateTimeBuilder_ == null) { + rolloutUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + rolloutUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + public Builder mergeRolloutUpdateTime(com.google.protobuf.Timestamp value) { + if (rolloutUpdateTimeBuilder_ == null) { + if (rolloutUpdateTime_ != null) { + rolloutUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(rolloutUpdateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + rolloutUpdateTime_ = value; + } + onChanged(); + } else { + rolloutUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + public Builder clearRolloutUpdateTime() { + if (rolloutUpdateTimeBuilder_ == null) { + rolloutUpdateTime_ = null; + onChanged(); + } else { + rolloutUpdateTime_ = null; + rolloutUpdateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getRolloutUpdateTimeBuilder() { + + onChanged(); + return getRolloutUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getRolloutUpdateTimeOrBuilder() { + if (rolloutUpdateTimeBuilder_ != null) { + return rolloutUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return rolloutUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : rolloutUpdateTime_; + } + } + /** + * + * + *
+     * Rollout update time
+     * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRolloutUpdateTimeFieldBuilder() { + if (rolloutUpdateTimeBuilder_ == null) { + rolloutUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRolloutUpdateTime(), getParentForChildren(), isClean()); + rolloutUpdateTime_ = null; + } + return rolloutUpdateTimeBuilder_; + } + + @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.v1alpha.OSPolicyAssignmentOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyAssignmentOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyAssignmentOperationMetadata(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.v1alpha.OSPolicyAssignmentOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadataOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadataOrBuilder.java new file mode 100644 index 00000000..6b6e7536 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOperationMetadataOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface OSPolicyAssignmentOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return The osPolicyAssignment. + */ + java.lang.String getOsPolicyAssignment(); + /** + * + * + *
+   * Reference to the `OSPolicyAssignment` API resource.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
+   * 
+ * + * string os_policy_assignment = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for osPolicyAssignment. + */ + com.google.protobuf.ByteString getOsPolicyAssignmentBytes(); + + /** + * + * + *
+   * The OS policy assignment API method.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return The enum numeric value on the wire for apiMethod. + */ + int getApiMethodValue(); + /** + * + * + *
+   * The OS policy assignment API method.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * + * + * @return The apiMethod. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.APIMethod getApiMethod(); + + /** + * + * + *
+   * State of the rollout
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return The enum numeric value on the wire for rolloutState. + */ + int getRolloutStateValue(); + /** + * + * + *
+   * State of the rollout
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * + * + * @return The rolloutState. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOperationMetadata.RolloutState + getRolloutState(); + + /** + * + * + *
+   * Rollout start time
+   * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + * + * @return Whether the rolloutStartTime field is set. + */ + boolean hasRolloutStartTime(); + /** + * + * + *
+   * Rollout start time
+   * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + * + * @return The rolloutStartTime. + */ + com.google.protobuf.Timestamp getRolloutStartTime(); + /** + * + * + *
+   * Rollout start time
+   * 
+ * + * .google.protobuf.Timestamp rollout_start_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getRolloutStartTimeOrBuilder(); + + /** + * + * + *
+   * Rollout update time
+   * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + * + * @return Whether the rolloutUpdateTime field is set. + */ + boolean hasRolloutUpdateTime(); + /** + * + * + *
+   * Rollout update time
+   * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + * + * @return The rolloutUpdateTime. + */ + com.google.protobuf.Timestamp getRolloutUpdateTime(); + /** + * + * + *
+   * Rollout update time
+   * 
+ * + * .google.protobuf.Timestamp rollout_update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getRolloutUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java new file mode 100644 index 00000000..16945c87 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignmentOrBuilder.java @@ -0,0 +1,418 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface OSPolicyAssignmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyAssignment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+   * This field is ignored when you create an OS policy assignment.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
+   * This field is ignored when you create an OS policy assignment.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * OS policy assignment description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * OS policy assignment description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getOsPoliciesList(); + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy getOsPolicies(int index); + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getOsPoliciesCount(); + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getOsPoliciesOrBuilderList(); + /** + * + * + *
+   * Required. List of OS policies to be applied to the VMs.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyOrBuilder getOsPoliciesOrBuilder(int index); + + /** + * + * + *
+   * Required. Filter to select VMs.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + boolean hasInstanceFilter(); + /** + * + * + *
+   * Required. Filter to select VMs.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter getInstanceFilter(); + /** + * + * + *
+   * Required. Filter to select VMs.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+   * Required. Rollout to deploy the OS policy assignment.
+   * A rollout is triggered in the following situations:
+   * 1) OSPolicyAssignment is created.
+   * 2) OSPolicyAssignment is updated and the update contains changes to one of
+   * the following fields:
+   *    - instance_filter
+   *    - os_policies
+   * 3) OSPolicyAssignment is deleted.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+   * Required. Rollout to deploy the OS policy assignment.
+   * A rollout is triggered in the following situations:
+   * 1) OSPolicyAssignment is created.
+   * 2) OSPolicyAssignment is updated and the update contains changes to one of
+   * the following fields:
+   *    - instance_filter
+   *    - os_policies
+   * 3) OSPolicyAssignment is deleted.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout getRollout(); + /** + * + * + *
+   * Required. Rollout to deploy the OS policy assignment.
+   * A rollout is triggered in the following situations:
+   * 1) OSPolicyAssignment is created.
+   * 2) OSPolicyAssignment is updated and the update contains changes to one of
+   * the following fields:
+   *    - instance_filter
+   *    - os_policies
+   * 3) OSPolicyAssignment is deleted.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutOrBuilder getRolloutOrBuilder(); + + /** + * + * + *
+   * Output only. The assignment revision ID
+   * A new revision is committed whenever a rollout is triggered for a OS policy
+   * assignment
+   * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + java.lang.String getRevisionId(); + /** + * + * + *
+   * Output only. The assignment revision ID
+   * A new revision is committed whenever a rollout is triggered for a OS policy
+   * assignment
+   * 
+ * + * string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString getRevisionIdBytes(); + + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the revisionCreateTime field is set. + */ + boolean hasRevisionCreateTime(); + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The revisionCreateTime. + */ + com.google.protobuf.Timestamp getRevisionCreateTime(); + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * + * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. OS policy assignment rollout state
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for rolloutState. + */ + int getRolloutStateValue(); + /** + * + * + *
+   * Output only. OS policy assignment rollout state
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rolloutState. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState getRolloutState(); + + /** + * + * + *
+   * Output only. Indicates that this revision has been successfully rolled out in this zone
+   * and new VMs will be assigned OS policies from this revision.
+   * For a given OS policy assignment, there is only one revision with a value
+   * of `true` for this field.
+   * 
+ * + * bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The baseline. + */ + boolean getBaseline(); + + /** + * + * + *
+   * Output only. Indicates that this revision deletes the OS policy assignment.
+   * 
+ * + * bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deleted. + */ + boolean getDeleted(); + + /** + * + * + *
+   * Output only. Indicates that reconciliation is in progress for the revision.
+   * This value is `true` when the `rollout_state` is one of:
+   * * IN_PROGRESS
+   * * CANCELLING
+   * 
+ * + * bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Output only. Server generated unique id for the OS policy assignment resource.
+   * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Server generated unique id for the OS policy assignment resource.
+   * 
+ * + * string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignments.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignments.java new file mode 100644 index 00000000..0ae5d5e1 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyAssignments.java @@ -0,0 +1,354 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class OSPolicyAssignments { + private OSPolicyAssignments() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n9google/cloud/osconfig/v1alpha/os_polic" + + "y_assignments.proto\022\035google.cloud.osconf" + + "ig.v1alpha\032\037google/api/field_behavior.pr" + + "oto\032\031google/api/resource.proto\032-google/c" + + "loud/osconfig/v1alpha/os_policy.proto\0323g" + + "oogle/cloud/osconfig/v1alpha/osconfig_co" + + "mmon.proto\032\036google/protobuf/duration.pro" + + "to\032 google/protobuf/field_mask.proto\032\037go" + + "ogle/protobuf/timestamp.proto\"\274\n\n\022OSPoli" + + "cyAssignment\022\014\n\004name\030\001 \001(\t\022\023\n\013descriptio" + + "n\030\002 \001(\t\022A\n\013os_policies\030\003 \003(\0132\'.google.cl" + + "oud.osconfig.v1alpha.OSPolicyB\003\340A\002\022^\n\017in" + + "stance_filter\030\004 \001(\0132@.google.cloud.oscon" + + "fig.v1alpha.OSPolicyAssignment.InstanceF" + + "ilterB\003\340A\002\022O\n\007rollout\030\005 \001(\01329.google.clo" + + "ud.osconfig.v1alpha.OSPolicyAssignment.R" + + "olloutB\003\340A\002\022\030\n\013revision_id\030\006 \001(\tB\003\340A\003\022=\n" + + "\024revision_create_time\030\007 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\022Z\n\rrollout_state\030\t " + + "\001(\0162>.google.cloud.osconfig.v1alpha.OSPo" + + "licyAssignment.RolloutStateB\003\340A\003\022\025\n\010base" + + "line\030\n \001(\010B\003\340A\003\022\024\n\007deleted\030\013 \001(\010B\003\340A\003\022\030\n" + + "\013reconciling\030\014 \001(\010B\003\340A\003\022\020\n\003uid\030\r \001(\tB\003\340A" + + "\003\032\221\001\n\010LabelSet\022V\n\006labels\030\001 \003(\0132F.google." + + "cloud.osconfig.v1alpha.OSPolicyAssignmen" + + "t.LabelSet.LabelsEntry\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\341\001\n\016Instan" + + "ceFilter\022\013\n\003all\030\001 \001(\010\022\026\n\016os_short_names\030" + + "\002 \003(\t\022T\n\020inclusion_labels\030\003 \003(\0132:.google" + + ".cloud.osconfig.v1alpha.OSPolicyAssignme" + + "nt.LabelSet\022T\n\020exclusion_labels\030\004 \003(\0132:." + + "google.cloud.osconfig.v1alpha.OSPolicyAs" + + "signment.LabelSet\032\223\001\n\007Rollout\022M\n\021disrupt" + + "ion_budget\030\001 \001(\0132-.google.cloud.osconfig" + + ".v1alpha.FixedOrPercentB\003\340A\002\0229\n\021min_wait" + + "_duration\030\002 \001(\0132\031.google.protobuf.Durati" + + "onB\003\340A\002\"l\n\014RolloutState\022\035\n\031ROLLOUT_STATE" + + "_UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\016\n\nCANCE" + + "LLING\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED\020\004:\204\001" + + "\352A\200\001\n*osconfig.googleapis.com/OSPolicyAs" + + "signment\022Rprojects/{project}/locations/{" + + "location}/osPolicyAssignments/{os_policy" + + "_assignment}\"\352\004\n#OSPolicyAssignmentOpera" + + "tionMetadata\022M\n\024os_policy_assignment\030\001 \001" + + "(\tB/\372A,\n*osconfig.googleapis.com/OSPolic" + + "yAssignment\022`\n\napi_method\030\002 \001(\0162L.google" + + ".cloud.osconfig.v1alpha.OSPolicyAssignme" + + "ntOperationMetadata.APIMethod\022f\n\rrollout" + + "_state\030\003 \001(\0162O.google.cloud.osconfig.v1a" + + "lpha.OSPolicyAssignmentOperationMetadata" + + ".RolloutState\0226\n\022rollout_start_time\030\004 \001(" + + "\0132\032.google.protobuf.Timestamp\0227\n\023rollout" + + "_update_time\030\005 \001(\0132\032.google.protobuf.Tim" + + "estamp\"K\n\tAPIMethod\022\032\n\026API_METHOD_UNSPEC" + + "IFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELET" + + "E\020\003\"l\n\014RolloutState\022\035\n\031ROLLOUT_STATE_UNS" + + "PECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\016\n\nCANCELLIN" + + "G\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED\020\004\"\330\001\n\037Cr" + + "eateOSPolicyAssignmentRequest\0229\n\006parent\030" + + "\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com/" + + "Location\022T\n\024os_policy_assignment\030\002 \001(\01321" + + ".google.cloud.osconfig.v1alpha.OSPolicyA" + + "ssignmentB\003\340A\002\022$\n\027os_policy_assignment_i" + + "d\030\003 \001(\tB\003\340A\002\"\255\001\n\037UpdateOSPolicyAssignmen" + + "tRequest\022T\n\024os_policy_assignment\030\001 \001(\01321" + + ".google.cloud.osconfig.v1alpha.OSPolicyA" + + "ssignmentB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.go" + + "ogle.protobuf.FieldMaskB\003\340A\001\"`\n\034GetOSPol" + + "icyAssignmentRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372" + + "A,\n*osconfig.googleapis.com/OSPolicyAssi" + + "gnment\"\202\001\n\036ListOSPolicyAssignmentsReques" + + "t\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.goo" + + "gleapis.com/Location\022\021\n\tpage_size\030\002 \001(\005\022" + + "\022\n\npage_token\030\003 \001(\t\"\214\001\n\037ListOSPolicyAssi" + + "gnmentsResponse\022P\n\025os_policy_assignments" + + "\030\001 \003(\01321.google.cloud.osconfig.v1alpha.O" + + "SPolicyAssignment\022\027\n\017next_page_token\030\002 \001" + + "(\t\"\221\001\n&ListOSPolicyAssignmentRevisionsRe" + + "quest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*osconfig.go" + + "ogleapis.com/OSPolicyAssignment\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\224\001\n\'ListO" + + "SPolicyAssignmentRevisionsResponse\022P\n\025os" + + "_policy_assignments\030\001 \003(\01321.google.cloud" + + ".osconfig.v1alpha.OSPolicyAssignment\022\027\n\017" + + "next_page_token\030\002 \001(\t\"c\n\037DeleteOSPolicyA" + + "ssignmentRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*" + + "osconfig.googleapis.com/OSPolicyAssignme" + + "ntB\344\001\n!com.google.cloud.osconfig.v1alpha" + + "B\023OSPolicyAssignmentsP\001ZEgoogle.golang.o" + + "rg/genproto/googleapis/cloud/osconfig/v1" + + "alpha;osconfig\252\002\035Google.Cloud.OsConfig.V" + + "1Alpha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002" + + " Google::Cloud::OsConfig::V1alphab\006proto" + + "3" + }; + 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.v1alpha.OSPolicyProto.getDescriptor(), + com.google.cloud.osconfig.v1alpha.Common.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor, + new java.lang.String[] { + "Name", + "Description", + "OsPolicies", + "InstanceFilter", + "Rollout", + "RevisionId", + "RevisionCreateTime", + "RolloutState", + "Baseline", + "Deleted", + "Reconciling", + "Uid", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor, + new java.lang.String[] { + "Labels", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_LabelSet_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_InstanceFilter_descriptor, + new java.lang.String[] { + "All", "OsShortNames", "InclusionLabels", "ExclusionLabels", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignment_Rollout_descriptor, + new java.lang.String[] { + "DisruptionBudget", "MinWaitDuration", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicyAssignmentOperationMetadata_descriptor, + new java.lang.String[] { + "OsPolicyAssignment", + "ApiMethod", + "RolloutState", + "RolloutStartTime", + "RolloutUpdateTime", + }); + internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_CreateOSPolicyAssignmentRequest_descriptor, + new java.lang.String[] { + "Parent", "OsPolicyAssignment", "OsPolicyAssignmentId", + }); + internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor, + new java.lang.String[] { + "OsPolicyAssignment", "UpdateMask", + }); + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_GetOSPolicyAssignmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentsResponse_descriptor, + new java.lang.String[] { + "OsPolicyAssignments", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsRequest_descriptor, + new java.lang.String[] { + "Name", "PageSize", "PageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListOSPolicyAssignmentRevisionsResponse_descriptor, + new java.lang.String[] { + "OsPolicyAssignments", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_DeleteOSPolicyAssignmentRequest_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.v1alpha.OSPolicyProto.getDescriptor(); + com.google.cloud.osconfig.v1alpha.Common.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java new file mode 100644 index 00000000..890f3d82 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyComplianceState.java @@ -0,0 +1,227 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/config_common.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * Supported OSPolicy compliance states.
+ * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyComplianceState} + */ +public enum OSPolicyComplianceState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value. This value is unused.
+   * 
+ * + * OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0; + */ + OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * Compliant state.
+   * 
+ * + * COMPLIANT = 1; + */ + COMPLIANT(1), + /** + * + * + *
+   * Non-compliant state
+   * 
+ * + * NON_COMPLIANT = 2; + */ + NON_COMPLIANT(2), + /** + * + * + *
+   * Unknown compliance state.
+   * 
+ * + * UNKNOWN = 3; + */ + UNKNOWN(3), + /** + * + * + *
+   * No applicable OS policies were found for the instance.
+   * This state is only applicable to the instance.
+   * 
+ * + * NO_OS_POLICIES_APPLICABLE = 4; + */ + NO_OS_POLICIES_APPLICABLE(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Default value. This value is unused.
+   * 
+ * + * OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0; + */ + public static final int OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Compliant state.
+   * 
+ * + * COMPLIANT = 1; + */ + public static final int COMPLIANT_VALUE = 1; + /** + * + * + *
+   * Non-compliant state
+   * 
+ * + * NON_COMPLIANT = 2; + */ + public static final int NON_COMPLIANT_VALUE = 2; + /** + * + * + *
+   * Unknown compliance state.
+   * 
+ * + * UNKNOWN = 3; + */ + public static final int UNKNOWN_VALUE = 3; + /** + * + * + *
+   * No applicable OS policies were found for the instance.
+   * This state is only applicable to the instance.
+   * 
+ * + * NO_OS_POLICIES_APPLICABLE = 4; + */ + public static final int NO_OS_POLICIES_APPLICABLE_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OSPolicyComplianceState 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 OSPolicyComplianceState forNumber(int value) { + switch (value) { + case 0: + return OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED; + case 1: + return COMPLIANT; + case 2: + return NON_COMPLIANT; + case 3: + return UNKNOWN; + case 4: + return NO_OS_POLICIES_APPLICABLE; + 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 OSPolicyComplianceState findValueByNumber(int number) { + return OSPolicyComplianceState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OSPolicyComplianceState[] VALUES = values(); + + public static OSPolicyComplianceState 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 OSPolicyComplianceState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyComplianceState) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyOrBuilder.java new file mode 100644 index 00000000..58be6077 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface OSPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The id of the OS policy with the following restrictions:
+   * * 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 assignment.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Required. The id of the OS policy with the following restrictions:
+   * * 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 assignment.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Policy description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Policy description.
+   * Length of the description is limited to 1024 characters.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Policy mode
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + /** + * + * + *
+   * Required. Policy mode
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mode. + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.Mode getMode(); + + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getResourceGroupsList(); + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup getResourceGroups(int index); + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getResourceGroupsCount(); + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getResourceGroupsOrBuilderList(); + /** + * + * + *
+   * Required. List of resource groups for the policy.
+   * For a particular VM, resource groups are evaluated in the order specified
+   * and the first resource group that is applicable is selected and the rest
+   * are ignored.
+   * If none of the resource groups are applicable for a VM, the VM is
+   * considered to be non-compliant w.r.t this policy. This behavior can be
+   * toggled by the flag `allow_no_resource_group_match`
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicy.ResourceGroupOrBuilder getResourceGroupsOrBuilder( + int index); + + /** + * + * + *
+   * This flag determines the OS policy compliance status when none of the
+   * resource groups within the policy are applicable for a VM. Set this value
+   * to `true` if the policy needs to be reported as compliant even if the
+   * policy has nothing to validate or enforce.
+   * 
+ * + * bool allow_no_resource_group_match = 5; + * + * @return The allowNoResourceGroupMatch. + */ + boolean getAllowNoResourceGroupMatch(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java new file mode 100644 index 00000000..69e85e98 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyProto.java @@ -0,0 +1,494 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/os_policy.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class OSPolicyProto { + private OSPolicyProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_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/v1alpha/os_polic" + + "y.proto\022\035google.cloud.osconfig.v1alpha\032\037" + + "google/api/field_behavior.proto\"\351!\n\010OSPo" + + "licy\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001" + + "(\t\022?\n\004mode\030\003 \001(\0162,.google.cloud.osconfig" + + ".v1alpha.OSPolicy.ModeB\003\340A\002\022S\n\017resource_" + + "groups\030\004 \003(\01325.google.cloud.osconfig.v1a" + + "lpha.OSPolicy.ResourceGroupB\003\340A\002\022%\n\035allo" + + "w_no_resource_group_match\030\005 \001(\010\0325\n\010OSFil" + + "ter\022\025\n\ros_short_name\030\001 \001(\t\022\022\n\nos_version" + + "\030\002 \001(\t\032\342\035\n\010Resource\022\017\n\002id\030\001 \001(\tB\003\340A\002\022O\n\003" + + "pkg\030\002 \001(\0132@.google.cloud.osconfig.v1alph" + + "a.OSPolicy.Resource.PackageResourceH\000\022Y\n" + + "\nrepository\030\003 \001(\0132C.google.cloud.osconfi" + + "g.v1alpha.OSPolicy.Resource.RepositoryRe" + + "sourceH\000\022M\n\004exec\030\004 \001(\0132=.google.cloud.os" + + "config.v1alpha.OSPolicy.Resource.ExecRes" + + "ourceH\000\022M\n\004file\030\005 \001(\0132=.google.cloud.osc" + + "onfig.v1alpha.OSPolicy.Resource.FileReso" + + "urceH\000\032\320\002\n\004File\022N\n\006remote\030\001 \001(\0132<.google" + + ".cloud.osconfig.v1alpha.OSPolicy.Resourc" + + "e.File.RemoteH\000\022H\n\003gcs\030\002 \001(\01329.google.cl" + + "oud.osconfig.v1alpha.OSPolicy.Resource.F" + + "ile.GcsH\000\022\024\n\nlocal_path\030\003 \001(\tH\000\022\026\n\016allow" + + "_insecure\030\004 \001(\010\0323\n\006Remote\022\020\n\003uri\030\001 \001(\tB\003" + + "\340A\002\022\027\n\017sha256_checksum\030\002 \001(\t\032C\n\003Gcs\022\023\n\006b" + + "ucket\030\001 \001(\tB\003\340A\002\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\022\n" + + "\ngeneration\030\003 \001(\003B\006\n\004type\032\331\t\n\017PackageRes" + + "ource\022i\n\rdesired_state\030\001 \001(\0162M.google.cl" + + "oud.osconfig.v1alpha.OSPolicy.Resource.P" + + "ackageResource.DesiredStateB\003\340A\002\022S\n\003apt\030" + + "\002 \001(\0132D.google.cloud.osconfig.v1alpha.OS" + + "Policy.Resource.PackageResource.APTH\000\022S\n" + + "\003deb\030\003 \001(\0132D.google.cloud.osconfig.v1alp" + + "ha.OSPolicy.Resource.PackageResource.Deb" + + "H\000\022S\n\003yum\030\004 \001(\0132D.google.cloud.osconfig." + + "v1alpha.OSPolicy.Resource.PackageResourc" + + "e.YUMH\000\022Y\n\006zypper\030\005 \001(\0132G.google.cloud.o" + + "sconfig.v1alpha.OSPolicy.Resource.Packag" + + "eResource.ZypperH\000\022S\n\003rpm\030\006 \001(\0132D.google" + + ".cloud.osconfig.v1alpha.OSPolicy.Resourc" + + "e.PackageResource.RPMH\000\022Y\n\006googet\030\007 \001(\0132" + + "G.google.cloud.osconfig.v1alpha.OSPolicy" + + ".Resource.PackageResource.GooGetH\000\022S\n\003ms" + + "i\030\010 \001(\0132D.google.cloud.osconfig.v1alpha." + + "OSPolicy.Resource.PackageResource.MSIH\000\032" + + "d\n\003Deb\022J\n\006source\030\001 \001(\01325.google.cloud.os" + + "config.v1alpha.OSPolicy.Resource.FileB\003\340" + + "A\002\022\021\n\tpull_deps\030\002 \001(\010\032\030\n\003APT\022\021\n\004name\030\001 \001" + + "(\tB\003\340A\002\032d\n\003RPM\022J\n\006source\030\001 \001(\01325.google." + + "cloud.osconfig.v1alpha.OSPolicy.Resource" + + ".FileB\003\340A\002\022\021\n\tpull_deps\030\002 \001(\010\032\030\n\003YUM\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\002\032\033\n\006Zypper\022\021\n\004name\030\001 \001(\tB" + + "\003\340A\002\032\033\n\006GooGet\022\021\n\004name\030\001 \001(\tB\003\340A\002\032e\n\003MSI" + + "\022J\n\006source\030\001 \001(\01325.google.cloud.osconfig" + + ".v1alpha.OSPolicy.Resource.FileB\003\340A\002\022\022\n\n" + + "properties\030\002 \003(\t\"I\n\014DesiredState\022\035\n\031DESI" + + "RED_STATE_UNSPECIFIED\020\000\022\r\n\tINSTALLED\020\001\022\013" + + "\n\007REMOVED\020\002B\020\n\016system_package\032\321\007\n\022Reposi" + + "toryResource\022`\n\003apt\030\001 \001(\0132Q.google.cloud" + + ".osconfig.v1alpha.OSPolicy.Resource.Repo" + + "sitoryResource.AptRepositoryH\000\022`\n\003yum\030\002 " + + "\001(\0132Q.google.cloud.osconfig.v1alpha.OSPo" + + "licy.Resource.RepositoryResource.YumRepo" + + "sitoryH\000\022f\n\006zypper\030\003 \001(\0132T.google.cloud." + + "osconfig.v1alpha.OSPolicy.Resource.Repos" + + "itoryResource.ZypperRepositoryH\000\022`\n\003goo\030" + + "\004 \001(\0132Q.google.cloud.osconfig.v1alpha.OS" + + "Policy.Resource.RepositoryResource.GooRe" + + "positoryH\000\032\243\002\n\rAptRepository\022x\n\014archive_" + + "type\030\001 \001(\0162].google.cloud.osconfig.v1alp" + + "ha.OSPolicy.Resource.RepositoryResource." + + "AptRepository.ArchiveTypeB\003\340A\002\022\020\n\003uri\030\002 " + + "\001(\tB\003\340A\002\022\031\n\014distribution\030\003 \001(\tB\003\340A\002\022\027\n\nc" + + "omponents\030\004 \003(\tB\003\340A\002\022\017\n\007gpg_key\030\005 \001(\t\"A\n" + + "\013ArchiveType\022\034\n\030ARCHIVE_TYPE_UNSPECIFIED" + + "\020\000\022\007\n\003DEB\020\001\022\013\n\007DEB_SRC\020\002\032_\n\rYumRepositor" + + "y\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t" + + "\022\025\n\010base_url\030\003 \001(\tB\003\340A\002\022\020\n\010gpg_keys\030\004 \003(" + + "\t\032b\n\020ZypperRepository\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024" + + "\n\014display_name\030\002 \001(\t\022\025\n\010base_url\030\003 \001(\tB\003" + + "\340A\002\022\020\n\010gpg_keys\030\004 \003(\t\0324\n\rGooRepository\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\002\022\020\n\003url\030\002 \001(\tB\003\340A\002B\014\n\nr" + + "epository\032\215\004\n\014ExecResource\022Y\n\010validate\030\001" + + " \001(\0132B.google.cloud.osconfig.v1alpha.OSP" + + "olicy.Resource.ExecResource.ExecB\003\340A\002\022S\n" + + "\007enforce\030\002 \001(\0132B.google.cloud.osconfig.v" + + "1alpha.OSPolicy.Resource.ExecResource.Ex" + + "ec\032\314\002\n\004Exec\022E\n\004file\030\001 \001(\01325.google.cloud" + + ".osconfig.v1alpha.OSPolicy.Resource.File" + + "H\000\022\020\n\006script\030\002 \001(\tH\000\022\014\n\004args\030\003 \003(\t\022h\n\013in" + + "terpreter\030\004 \001(\0162N.google.cloud.osconfig." + + "v1alpha.OSPolicy.Resource.ExecResource.E" + + "xec.InterpreterB\003\340A\002\022\030\n\020output_file_path" + + "\030\005 \001(\t\"O\n\013Interpreter\022\033\n\027INTERPRETER_UNS" + + "PECIFIED\020\000\022\010\n\004NONE\020\001\022\t\n\005SHELL\020\002\022\016\n\nPOWER" + + "SHELL\020\003B\010\n\006source\032\326\002\n\014FileResource\022E\n\004fi" + + "le\030\001 \001(\01325.google.cloud.osconfig.v1alpha" + + ".OSPolicy.Resource.FileH\000\022\021\n\007content\030\002 \001" + + "(\tH\000\022\021\n\004path\030\003 \001(\tB\003\340A\002\022^\n\005state\030\004 \001(\0162J" + + ".google.cloud.osconfig.v1alpha.OSPolicy." + + "Resource.FileResource.DesiredStateB\003\340A\002\022" + + "\023\n\013permissions\030\005 \001(\t\"Z\n\014DesiredState\022\035\n\031" + + "DESIRED_STATE_UNSPECIFIED\020\000\022\013\n\007PRESENT\020\001" + + "\022\n\n\006ABSENT\020\002\022\022\n\016CONTENTS_MATCH\020\003B\010\n\006sour" + + "ceB\017\n\rresource_type\032\236\001\n\rResourceGroup\022C\n" + + "\tos_filter\030\001 \001(\01320.google.cloud.osconfig" + + ".v1alpha.OSPolicy.OSFilter\022H\n\tresources\030" + + "\002 \003(\01320.google.cloud.osconfig.v1alpha.OS" + + "Policy.ResourceB\003\340A\002\"=\n\004Mode\022\024\n\020MODE_UNS" + + "PECIFIED\020\000\022\016\n\nVALIDATION\020\001\022\017\n\013ENFORCEMEN" + + "T\020\002B\336\001\n!com.google.cloud.osconfig.v1alph" + + "aB\rOSPolicyProtoP\001ZEgoogle.golang.org/ge" + + "nproto/googleapis/cloud/osconfig/v1alpha" + + ";osconfig\252\002\035Google.Cloud.OsConfig.V1Alph" + + "a\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 Goog" + + "le::Cloud::OsConfig::V1alphab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor, + new java.lang.String[] { + "Id", "Description", "Mode", "ResourceGroups", "AllowNoResourceGroupMatch", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_OSFilter_descriptor, + new java.lang.String[] { + "OsShortName", "OsVersion", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor, + new java.lang.String[] { + "Id", "Pkg", "Repository", "Exec", "File", "ResourceType", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor, + new java.lang.String[] { + "Remote", "Gcs", "LocalPath", "AllowInsecure", "Type", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Remote_descriptor, + new java.lang.String[] { + "Uri", "Sha256Checksum", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_File_Gcs_descriptor, + new java.lang.String[] { + "Bucket", "Object", "Generation", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor, + new java.lang.String[] { + "DesiredState", + "Apt", + "Deb", + "Yum", + "Zypper", + "Rpm", + "Googet", + "Msi", + "SystemPackage", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Deb_descriptor, + new java.lang.String[] { + "Source", "PullDeps", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_APT_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_RPM_descriptor, + new java.lang.String[] { + "Source", "PullDeps", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_YUM_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_Zypper_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_GooGet_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_PackageResource_MSI_descriptor, + new java.lang.String[] { + "Source", "Properties", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor, + new java.lang.String[] { + "Apt", "Yum", "Zypper", "Goo", "Repository", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_AptRepository_descriptor, + new java.lang.String[] { + "ArchiveType", "Uri", "Distribution", "Components", "GpgKey", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_YumRepository_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "BaseUrl", "GpgKeys", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_ZypperRepository_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "BaseUrl", "GpgKeys", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_RepositoryResource_GooRepository_descriptor, + new java.lang.String[] { + "Name", "Url", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor, + new java.lang.String[] { + "Validate", "Enforce", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_ExecResource_Exec_descriptor, + new java.lang.String[] { + "File", "Script", "Args", "Interpreter", "OutputFilePath", "Source", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_Resource_FileResource_descriptor, + new java.lang.String[] { + "File", "Content", "Path", "State", "Permissions", "Source", + }); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor = + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_OSPolicy_ResourceGroup_descriptor, + new java.lang.String[] { + "OsFilter", "Resources", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java new file mode 100644 index 00000000..de4e52bb --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceCompliance.java @@ -0,0 +1,2405 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/config_common.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * Compliance data for an OS policy resource.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} + */ +public final class OSPolicyResourceCompliance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) + OSPolicyResourceComplianceOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyResourceCompliance.newBuilder() to construct. + private OSPolicyResourceCompliance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyResourceCompliance() { + osPolicyResourceId_ = ""; + configSteps_ = java.util.Collections.emptyList(); + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyResourceCompliance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyResourceCompliance( + 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(); + + osPolicyResourceId_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + configSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep>(); + mutable_bitField0_ |= 0x00000001; + } + configSteps_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.parser(), + extensionRegistry)); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 34: + { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .Builder + subBuilder = null; + if (outputCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutput) + output_) + .toBuilder(); + } + output_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutput.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutput) + output_); + output_ = subBuilder.buildPartial(); + } + outputCase_ = 4; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + configSteps_ = java.util.Collections.unmodifiableList(configSteps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.class, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder.class); + } + + public interface ExecResourceOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output from Enforcement phase output file (if run).
+     * Output size is limited to 100K bytes.
+     * 
+ * + * bytes enforcement_output = 2; + * + * @return The enforcementOutput. + */ + com.google.protobuf.ByteString getEnforcementOutput(); + } + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} + */ + public static final class ExecResourceOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + ExecResourceOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecResourceOutput.newBuilder() to construct. + private ExecResourceOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecResourceOutput() { + enforcementOutput_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecResourceOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecResourceOutput( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + enforcementOutput_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.class, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .Builder.class); + } + + public static final int ENFORCEMENT_OUTPUT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString enforcementOutput_; + /** + * + * + *
+     * Output from Enforcement phase output file (if run).
+     * Output size is limited to 100K bytes.
+     * 
+ * + * bytes enforcement_output = 2; + * + * @return The enforcementOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementOutput() { + return enforcementOutput_; + } + + 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 (!enforcementOutput_.isEmpty()) { + output.writeBytes(2, enforcementOutput_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!enforcementOutput_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, enforcementOutput_); + } + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput other = + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) obj; + + if (!getEnforcementOutput().equals(other.getEnforcementOutput())) 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) + ENFORCEMENT_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getEnforcementOutput().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput 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; + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .class, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.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(); + enforcementOutput_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_ExecResourceOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + build() { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput result = + new com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput( + this); + result.enforcementOutput_ = enforcementOutput_; + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance()) return this; + if (other.getEnforcementOutput() != com.google.protobuf.ByteString.EMPTY) { + setEnforcementOutput(other.getEnforcementOutput()); + } + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString enforcementOutput_ = + com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+       * Output from Enforcement phase output file (if run).
+       * Output size is limited to 100K bytes.
+       * 
+ * + * bytes enforcement_output = 2; + * + * @return The enforcementOutput. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnforcementOutput() { + return enforcementOutput_; + } + /** + * + * + *
+       * Output from Enforcement phase output file (if run).
+       * Output size is limited to 100K bytes.
+       * 
+ * + * bytes enforcement_output = 2; + * + * @param value The enforcementOutput to set. + * @return This builder for chaining. + */ + public Builder setEnforcementOutput(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + enforcementOutput_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output from Enforcement phase output file (if run).
+       * Output size is limited to 100K bytes.
+       * 
+ * + * bytes enforcement_output = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnforcementOutput() { + + enforcementOutput_ = getDefaultInstance().getEnforcementOutput(); + 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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecResourceOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecResourceOutput(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.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public enum OutputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EXEC_RESOURCE_OUTPUT(4), + OUTPUT_NOT_SET(0); + private final int value; + + private OutputCase(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 OutputCase valueOf(int value) { + return forNumber(value); + } + + public static OutputCase forNumber(int value) { + switch (value) { + case 4: + return EXEC_RESOURCE_OUTPUT; + case 0: + return OUTPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public static final int OS_POLICY_RESOURCE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object osPolicyResourceId_; + /** + * + * + *
+   * The id of the OS policy resource.
+   * 
+ * + * string os_policy_resource_id = 1; + * + * @return The osPolicyResourceId. + */ + @java.lang.Override + public java.lang.String getOsPolicyResourceId() { + java.lang.Object ref = osPolicyResourceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyResourceId_ = s; + return s; + } + } + /** + * + * + *
+   * The id of the OS policy resource.
+   * 
+ * + * string os_policy_resource_id = 1; + * + * @return The bytes for osPolicyResourceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsPolicyResourceIdBytes() { + java.lang.Object ref = osPolicyResourceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_STEPS_FIELD_NUMBER = 2; + private java.util.List configSteps_; + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public java.util.List + getConfigStepsList() { + return configSteps_; + } + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsOrBuilderList() { + return configSteps_; + } + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public int getConfigStepsCount() { + return configSteps_.size(); + } + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep getConfigSteps(int index) { + return configSteps_.get(index); + } + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder + getConfigStepsOrBuilder(int index) { + return configSteps_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * Compliance state of the OS policy resource.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Compliance state of the OS policy resource.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState result = + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.UNRECOGNIZED + : result; + } + + public static final int EXEC_RESOURCE_OUTPUT_FIELD_NUMBER = 4; + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + * + * @return Whether the execResourceOutput field is set. + */ + @java.lang.Override + public boolean hasExecResourceOutput() { + return outputCase_ == 4; + } + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + * + * @return The execResourceOutput. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + getExecResourceOutput() { + if (outputCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutputOrBuilder + getExecResourceOutputOrBuilder() { + if (outputCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOsPolicyResourceIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osPolicyResourceId_); + } + for (int i = 0; i < configSteps_.size(); i++) { + output.writeMessage(2, configSteps_.get(i)); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState + .OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, state_); + } + if (outputCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOsPolicyResourceIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osPolicyResourceId_); + } + for (int i = 0; i < configSteps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, configSteps_.get(i)); + } + if (state_ + != com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState + .OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (outputCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_); + } + 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.v1alpha.OSPolicyResourceCompliance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance other = + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) obj; + + if (!getOsPolicyResourceId().equals(other.getOsPolicyResourceId())) return false; + if (!getConfigStepsList().equals(other.getConfigStepsList())) return false; + if (state_ != other.state_) return false; + if (!getOutputCase().equals(other.getOutputCase())) return false; + switch (outputCase_) { + case 4: + if (!getExecResourceOutput().equals(other.getExecResourceOutput())) 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) + OS_POLICY_RESOURCE_ID_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyResourceId().hashCode(); + if (getConfigStepsCount() > 0) { + hash = (37 * hash) + CONFIG_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getConfigStepsList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (outputCase_) { + case 4: + hash = (37 * hash) + EXEC_RESOURCE_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getExecResourceOutput().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance 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.v1alpha.OSPolicyResourceCompliance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance 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.v1alpha.OSPolicyResourceCompliance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance 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.v1alpha.OSPolicyResourceCompliance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance 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.v1alpha.OSPolicyResourceCompliance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance 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.v1alpha.OSPolicyResourceCompliance 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; + } + /** + * + * + *
+   * Compliance data for an OS policy resource.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) + com.google.cloud.osconfig.v1alpha.OSPolicyResourceComplianceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.class, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConfigStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + osPolicyResourceId_ = ""; + + if (configStepsBuilder_ == null) { + configSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configStepsBuilder_.clear(); + } + state_ = 0; + + outputCase_ = 0; + output_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceCompliance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance build() { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance result = + new com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(this); + int from_bitField0_ = bitField0_; + result.osPolicyResourceId_ = osPolicyResourceId_; + if (configStepsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configSteps_ = java.util.Collections.unmodifiableList(configSteps_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configSteps_ = configSteps_; + } else { + result.configSteps_ = configStepsBuilder_.build(); + } + result.state_ = state_; + if (outputCase_ == 4) { + if (execResourceOutputBuilder_ == null) { + result.output_ = output_; + } else { + result.output_ = execResourceOutputBuilder_.build(); + } + } + result.outputCase_ = outputCase_; + 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.v1alpha.OSPolicyResourceCompliance) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.getDefaultInstance()) + return this; + if (!other.getOsPolicyResourceId().isEmpty()) { + osPolicyResourceId_ = other.osPolicyResourceId_; + onChanged(); + } + if (configStepsBuilder_ == null) { + if (!other.configSteps_.isEmpty()) { + if (configSteps_.isEmpty()) { + configSteps_ = other.configSteps_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigStepsIsMutable(); + configSteps_.addAll(other.configSteps_); + } + onChanged(); + } + } else { + if (!other.configSteps_.isEmpty()) { + if (configStepsBuilder_.isEmpty()) { + configStepsBuilder_.dispose(); + configStepsBuilder_ = null; + configSteps_ = other.configSteps_; + bitField0_ = (bitField0_ & ~0x00000001); + configStepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConfigStepsFieldBuilder() + : null; + } else { + configStepsBuilder_.addAllMessages(other.configSteps_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getOutputCase()) { + case EXEC_RESOURCE_OUTPUT: + { + mergeExecResourceOutput(other.getExecResourceOutput()); + break; + } + case OUTPUT_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.v1alpha.OSPolicyResourceCompliance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public Builder clearOutput() { + outputCase_ = 0; + output_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object osPolicyResourceId_ = ""; + /** + * + * + *
+     * The id of the OS policy resource.
+     * 
+ * + * string os_policy_resource_id = 1; + * + * @return The osPolicyResourceId. + */ + public java.lang.String getOsPolicyResourceId() { + java.lang.Object ref = osPolicyResourceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osPolicyResourceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The id of the OS policy resource.
+     * 
+ * + * string os_policy_resource_id = 1; + * + * @return The bytes for osPolicyResourceId. + */ + public com.google.protobuf.ByteString getOsPolicyResourceIdBytes() { + java.lang.Object ref = osPolicyResourceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osPolicyResourceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The id of the OS policy resource.
+     * 
+ * + * string os_policy_resource_id = 1; + * + * @param value The osPolicyResourceId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyResourceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osPolicyResourceId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the OS policy resource.
+     * 
+ * + * string os_policy_resource_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsPolicyResourceId() { + + osPolicyResourceId_ = getDefaultInstance().getOsPolicyResourceId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The id of the OS policy resource.
+     * 
+ * + * string os_policy_resource_id = 1; + * + * @param value The bytes for osPolicyResourceId to set. + * @return This builder for chaining. + */ + public Builder setOsPolicyResourceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osPolicyResourceId_ = value; + onChanged(); + return this; + } + + private java.util.List + configSteps_ = java.util.Collections.emptyList(); + + private void ensureConfigStepsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configSteps_ = + new java.util.ArrayList( + configSteps_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder> + configStepsBuilder_; + + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public java.util.List + getConfigStepsList() { + if (configStepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(configSteps_); + } else { + return configStepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public int getConfigStepsCount() { + if (configStepsBuilder_ == null) { + return configSteps_.size(); + } else { + return configStepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep getConfigSteps(int index) { + if (configStepsBuilder_ == null) { + return configSteps_.get(index); + } else { + return configStepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder setConfigSteps( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep value) { + if (configStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigStepsIsMutable(); + configSteps_.set(index, value); + onChanged(); + } else { + configStepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder setConfigSteps( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder builderForValue) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.set(index, builderForValue.build()); + onChanged(); + } else { + configStepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep value) { + if (configStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigStepsIsMutable(); + configSteps_.add(value); + onChanged(); + } else { + configStepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + int index, com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep value) { + if (configStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigStepsIsMutable(); + configSteps_.add(index, value); + onChanged(); + } else { + configStepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder builderForValue) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.add(builderForValue.build()); + onChanged(); + } else { + configStepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addConfigSteps( + int index, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder builderForValue) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.add(index, builderForValue.build()); + onChanged(); + } else { + configStepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder addAllConfigSteps( + java.lang.Iterable + values) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configSteps_); + onChanged(); + } else { + configStepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder clearConfigSteps() { + if (configStepsBuilder_ == null) { + configSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configStepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public Builder removeConfigSteps(int index) { + if (configStepsBuilder_ == null) { + ensureConfigStepsIsMutable(); + configSteps_.remove(index); + onChanged(); + } else { + configStepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder + getConfigStepsBuilder(int index) { + return getConfigStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder + getConfigStepsOrBuilder(int index) { + if (configStepsBuilder_ == null) { + return configSteps_.get(index); + } else { + return configStepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsOrBuilderList() { + if (configStepsBuilder_ != null) { + return configStepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configSteps_); + } + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder + addConfigStepsBuilder() { + return getConfigStepsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.getDefaultInstance()); + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder + addConfigStepsBuilder(int index) { + return getConfigStepsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.getDefaultInstance()); + } + /** + * + * + *
+     * Ordered list of configuration steps taken by the agent for the OS policy
+     * resource.
+     * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + public java.util.List + getConfigStepsBuilderList() { + return getConfigStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder> + getConfigStepsFieldBuilder() { + if (configStepsBuilder_ == null) { + configStepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder>( + configSteps_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + configSteps_ = null; + } + return configStepsBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Compliance state of the OS policy resource.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Compliance state of the OS policy resource.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState 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; + } + /** + * + * + *
+     * Compliance state of the OS policy resource.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState result = + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Compliance state of the OS policy resource.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Compliance state of the OS policy resource.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutputOrBuilder> + execResourceOutputBuilder_; + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + * + * @return Whether the execResourceOutput field is set. + */ + @java.lang.Override + public boolean hasExecResourceOutput() { + return outputCase_ == 4; + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + * + * @return The execResourceOutput. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + getExecResourceOutput() { + if (execResourceOutputBuilder_ == null) { + if (outputCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } else { + if (outputCase_ == 4) { + return execResourceOutputBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + public Builder setExecResourceOutput( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput value) { + if (execResourceOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + output_ = value; + onChanged(); + } else { + execResourceOutputBuilder_.setMessage(value); + } + outputCase_ = 4; + return this; + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + public Builder setExecResourceOutput( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.Builder + builderForValue) { + if (execResourceOutputBuilder_ == null) { + output_ = builderForValue.build(); + onChanged(); + } else { + execResourceOutputBuilder_.setMessage(builderForValue.build()); + } + outputCase_ = 4; + return this; + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + public Builder mergeExecResourceOutput( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput value) { + if (execResourceOutputBuilder_ == null) { + if (outputCase_ == 4 + && output_ + != com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance()) { + output_ = + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .newBuilder( + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutput) + output_) + .mergeFrom(value) + .buildPartial(); + } else { + output_ = value; + } + onChanged(); + } else { + if (outputCase_ == 4) { + execResourceOutputBuilder_.mergeFrom(value); + } + execResourceOutputBuilder_.setMessage(value); + } + outputCase_ = 4; + return this; + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + public Builder clearExecResourceOutput() { + if (execResourceOutputBuilder_ == null) { + if (outputCase_ == 4) { + outputCase_ = 0; + output_ = null; + onChanged(); + } + } else { + if (outputCase_ == 4) { + outputCase_ = 0; + output_ = null; + } + execResourceOutputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.Builder + getExecResourceOutputBuilder() { + return getExecResourceOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutputOrBuilder + getExecResourceOutputOrBuilder() { + if ((outputCase_ == 4) && (execResourceOutputBuilder_ != null)) { + return execResourceOutputBuilder_.getMessageOrBuilder(); + } else { + if (outputCase_ == 4) { + return (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_; + } + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } + } + /** + * + * + *
+     * ExecResource specific output.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutputOrBuilder> + getExecResourceOutputFieldBuilder() { + if (execResourceOutputBuilder_ == null) { + if (!(outputCase_ == 4)) { + output_ = + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .getDefaultInstance(); + } + execResourceOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + .Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + .ExecResourceOutputOrBuilder>( + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput) + output_, + getParentForChildren(), + isClean()); + output_ = null; + } + outputCase_ = 4; + onChanged(); + ; + return execResourceOutputBuilder_; + } + + @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.v1alpha.OSPolicyResourceCompliance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyResourceCompliance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyResourceCompliance(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.v1alpha.OSPolicyResourceCompliance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java new file mode 100644 index 00000000..555e0c0a --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceComplianceOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/config_common.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface OSPolicyResourceComplianceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The id of the OS policy resource.
+   * 
+ * + * string os_policy_resource_id = 1; + * + * @return The osPolicyResourceId. + */ + java.lang.String getOsPolicyResourceId(); + /** + * + * + *
+   * The id of the OS policy resource.
+   * 
+ * + * string os_policy_resource_id = 1; + * + * @return The bytes for osPolicyResourceId. + */ + com.google.protobuf.ByteString getOsPolicyResourceIdBytes(); + + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + java.util.List getConfigStepsList(); + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep getConfigSteps(int index); + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + int getConfigStepsCount(); + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + java.util.List + getConfigStepsOrBuilderList(); + /** + * + * + *
+   * Ordered list of configuration steps taken by the agent for the OS policy
+   * resource.
+   * 
+ * + * repeated .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep config_steps = 2; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder getConfigStepsOrBuilder( + int index); + + /** + * + * + *
+   * Compliance state of the OS policy resource.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Compliance state of the OS policy resource.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyComplianceState state = 3; + * + * @return The state. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyComplianceState getState(); + + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + * + * @return Whether the execResourceOutput field is set. + */ + boolean hasExecResourceOutput(); + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + * + * @return The execResourceOutput. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput + getExecResourceOutput(); + /** + * + * + *
+   * ExecResource specific output.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 4; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.ExecResourceOutputOrBuilder + getExecResourceOutputOrBuilder(); + + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceCompliance.OutputCase getOutputCase(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java new file mode 100644 index 00000000..835cb02c --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStep.java @@ -0,0 +1,1339 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/config_common.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * Step performed by the OS Config agent for configuring an `OSPolicyResource`
+ * to its desired state.
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} + */ +public final class OSPolicyResourceConfigStep extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) + OSPolicyResourceConfigStepOrBuilder { + private static final long serialVersionUID = 0L; + // Use OSPolicyResourceConfigStep.newBuilder() to construct. + private OSPolicyResourceConfigStep(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OSPolicyResourceConfigStep() { + type_ = 0; + outcome_ = 0; + errorMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OSPolicyResourceConfigStep(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OSPolicyResourceConfigStep( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + outcome_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + errorMessage_ = 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.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.class, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder.class); + } + + /** + * + * + *
+   * Supported configuration step types
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Validation to detect resource conflicts, schema errors, etc.
+     * 
+ * + * VALIDATION = 1; + */ + VALIDATION(1), + /** + * + * + *
+     * Check the current desired state status of the resource.
+     * 
+ * + * DESIRED_STATE_CHECK = 2; + */ + DESIRED_STATE_CHECK(2), + /** + * + * + *
+     * Enforce the desired state for a resource that is not in desired state.
+     * 
+ * + * DESIRED_STATE_ENFORCEMENT = 3; + */ + DESIRED_STATE_ENFORCEMENT(3), + /** + * + * + *
+     * Re-check desired state status for a resource after enforcement of all
+     * resources in the current configuration run.
+     * This step is used to determine the final desired state status for the
+     * resource. It accounts for any resources that might have drifted from
+     * their desired state due to side effects from configuring other resources
+     * during the current configuration run.
+     * 
+ * + * DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + */ + DESIRED_STATE_CHECK_POST_ENFORCEMENT(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Validation to detect resource conflicts, schema errors, etc.
+     * 
+ * + * VALIDATION = 1; + */ + public static final int VALIDATION_VALUE = 1; + /** + * + * + *
+     * Check the current desired state status of the resource.
+     * 
+ * + * DESIRED_STATE_CHECK = 2; + */ + public static final int DESIRED_STATE_CHECK_VALUE = 2; + /** + * + * + *
+     * Enforce the desired state for a resource that is not in desired state.
+     * 
+ * + * DESIRED_STATE_ENFORCEMENT = 3; + */ + public static final int DESIRED_STATE_ENFORCEMENT_VALUE = 3; + /** + * + * + *
+     * Re-check desired state status for a resource after enforcement of all
+     * resources in the current configuration run.
+     * This step is used to determine the final desired state status for the
+     * resource. It accounts for any resources that might have drifted from
+     * their desired state due to side effects from configuring other resources
+     * during the current configuration run.
+     * 
+ * + * DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + */ + public static final int DESIRED_STATE_CHECK_POST_ENFORCEMENT_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 VALIDATION; + case 2: + return DESIRED_STATE_CHECK; + case 3: + return DESIRED_STATE_ENFORCEMENT; + case 4: + return DESIRED_STATE_CHECK_POST_ENFORCEMENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.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.v1alpha.OSPolicyResourceConfigStep.Type) + } + + /** + * + * + *
+   * Supported outcomes for a configuration step.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome} + */ + public enum Outcome implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * OUTCOME_UNSPECIFIED = 0; + */ + OUTCOME_UNSPECIFIED(0), + /** + * + * + *
+     * The step succeeded.
+     * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+     * The step failed.
+     * 
+ * + * FAILED = 2; + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * OUTCOME_UNSPECIFIED = 0; + */ + public static final int OUTCOME_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The step succeeded.
+     * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+     * The step failed.
+     * 
+ * + * FAILED = 2; + */ + public static final int FAILED_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 Outcome 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 Outcome forNumber(int value) { + switch (value) { + case 0: + return OUTCOME_UNSPECIFIED; + case 1: + return SUCCEEDED; + case 2: + return FAILED; + 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 Outcome findValueByNumber(int number) { + return Outcome.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Outcome[] VALUES = values(); + + public static Outcome 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 Outcome(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+   * Configuration step type.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Configuration step type.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type result = + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type.UNRECOGNIZED + : result; + } + + public static final int OUTCOME_FIELD_NUMBER = 2; + private int outcome_; + /** + * + * + *
+   * Outcome of the configuration step.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return The enum numeric value on the wire for outcome. + */ + @java.lang.Override + public int getOutcomeValue() { + return outcome_; + } + /** + * + * + *
+   * Outcome of the configuration step.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return The outcome. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome getOutcome() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome result = + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome.valueOf(outcome_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome.UNRECOGNIZED + : result; + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object errorMessage_; + /** + * + * + *
+   * An error message recorded during the execution of this step.
+   * Only populated when outcome is FAILED.
+   * 
+ * + * string error_message = 3; + * + * @return The errorMessage. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+   * An error message recorded during the execution of this step.
+   * Only populated when outcome is FAILED.
+   * 
+ * + * string error_message = 3; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + 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; + } + } + + 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.v1alpha.OSPolicyResourceConfigStep.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (outcome_ + != com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome.OUTCOME_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, outcome_); + } + if (!getErrorMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorMessage_); + } + 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.v1alpha.OSPolicyResourceConfigStep.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (outcome_ + != com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome.OUTCOME_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, outcome_); + } + if (!getErrorMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, errorMessage_); + } + 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.v1alpha.OSPolicyResourceConfigStep)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep other = + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) obj; + + if (type_ != other.type_) return false; + if (outcome_ != other.outcome_) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + OUTCOME_FIELD_NUMBER; + hash = (53 * hash) + outcome_; + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep 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.v1alpha.OSPolicyResourceConfigStep parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep 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.v1alpha.OSPolicyResourceConfigStep parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep 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.v1alpha.OSPolicyResourceConfigStep parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep 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.v1alpha.OSPolicyResourceConfigStep parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep 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.v1alpha.OSPolicyResourceConfigStep 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; + } + /** + * + * + *
+   * Step performed by the OS Config agent for configuring an `OSPolicyResource`
+   * to its desired state.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.class, + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.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; + + outcome_ = 0; + + errorMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.ConfigCommonProto + .internal_static_google_cloud_osconfig_v1alpha_OSPolicyResourceConfigStep_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep build() { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep buildPartial() { + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep result = + new com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(this); + result.type_ = type_; + result.outcome_ = outcome_; + result.errorMessage_ = errorMessage_; + 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.v1alpha.OSPolicyResourceConfigStep) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep other) { + if (other + == com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.outcome_ != 0) { + setOutcomeValue(other.getOutcomeValue()); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + 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.v1alpha.OSPolicyResourceConfigStep parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Configuration step type.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Configuration step type.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.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; + } + /** + * + * + *
+     * Configuration step type.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type result = + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Configuration step type.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Configuration step type.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private int outcome_ = 0; + /** + * + * + *
+     * Outcome of the configuration step.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return The enum numeric value on the wire for outcome. + */ + @java.lang.Override + public int getOutcomeValue() { + return outcome_; + } + /** + * + * + *
+     * Outcome of the configuration step.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @param value The enum numeric value on the wire for outcome to set. + * @return This builder for chaining. + */ + public Builder setOutcomeValue(int value) { + + outcome_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Outcome of the configuration step.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return The outcome. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome getOutcome() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome result = + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome.valueOf(outcome_); + return result == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Outcome of the configuration step.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @param value The outcome to set. + * @return This builder for chaining. + */ + public Builder setOutcome( + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome value) { + if (value == null) { + throw new NullPointerException(); + } + + outcome_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Outcome of the configuration step.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return This builder for chaining. + */ + public Builder clearOutcome() { + + outcome_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + /** + * + * + *
+     * An error message recorded during the execution of this step.
+     * Only populated when outcome is FAILED.
+     * 
+ * + * string error_message = 3; + * + * @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; + } + } + /** + * + * + *
+     * An error message recorded during the execution of this step.
+     * Only populated when outcome is FAILED.
+     * 
+ * + * string error_message = 3; + * + * @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; + } + } + /** + * + * + *
+     * An error message recorded during the execution of this step.
+     * Only populated when outcome is FAILED.
+     * 
+ * + * string error_message = 3; + * + * @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; + } + /** + * + * + *
+     * An error message recorded during the execution of this step.
+     * Only populated when outcome is FAILED.
+     * 
+ * + * string error_message = 3; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + + errorMessage_ = getDefaultInstance().getErrorMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * An error message recorded during the execution of this step.
+     * Only populated when outcome is FAILED.
+     * 
+ * + * string error_message = 3; + * + * @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; + } + + @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.v1alpha.OSPolicyResourceConfigStep) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) + private static final com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep(); + } + + public static com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OSPolicyResourceConfigStep parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OSPolicyResourceConfigStep(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.v1alpha.OSPolicyResourceConfigStep getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java new file mode 100644 index 00000000..8f93fc58 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OSPolicyResourceConfigStepOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/config_common.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface OSPolicyResourceConfigStepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration step type.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Configuration step type.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type type = 1; + * + * @return The type. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Type getType(); + + /** + * + * + *
+   * Outcome of the configuration step.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return The enum numeric value on the wire for outcome. + */ + int getOutcomeValue(); + /** + * + * + *
+   * Outcome of the configuration step.
+   * 
+ * + * .google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome outcome = 2; + * + * @return The outcome. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep.Outcome getOutcome(); + + /** + * + * + *
+   * An error message recorded during the execution of this step.
+   * Only populated when outcome is FAILED.
+   * 
+ * + * string error_message = 3; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + /** + * + * + *
+   * An error message recorded during the execution of this step.
+   * Only populated when outcome is FAILED.
+   * 
+ * + * string error_message = 3; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java new file mode 100644 index 00000000..31d74462 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceProto.java @@ -0,0 +1,172 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class OsConfigZonalServiceProto { + private OsConfigZonalServiceProto() {} + + 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/v1alpha/osconfig" + + "_zonal_service.proto\022\035google.cloud.oscon" + + "fig.v1alpha\032\034google/api/annotations.prot" + + "o\032\027google/api/client.proto\032\031google/api/r" + + "esource.proto\032Cgoogle/cloud/osconfig/v1a" + + "lpha/instance_os_policies_compliance.pro" + + "to\032-google/cloud/osconfig/v1alpha/invent" + + "ory.proto\0329google/cloud/osconfig/v1alpha" + + "/os_policy_assignments.proto\0321google/clo" + + "ud/osconfig/v1alpha/vulnerability.proto\032" + + "#google/longrunning/operations.proto2\324\030\n" + + "\024OsConfigZonalService\022\310\002\n\030CreateOSPolicy" + + "Assignment\022>.google.cloud.osconfig.v1alp" + + "ha.CreateOSPolicyAssignmentRequest\032\035.goo" + + "gle.longrunning.Operation\"\314\001\202\323\344\223\002T\".google.cloud.osc" + + "onfig.v1alpha.UpdateOSPolicyAssignmentRe" + + "quest\032\035.google.longrunning.Operation\"\316\001\202" + + "\323\344\223\002i2Q/v1alpha/{os_policy_assignment.na" + + "me=projects/*/locations/*/osPolicyAssign" + + "ments/*}:\024os_policy_assignment\332A os_poli" + + "cy_assignment,update_mask\312A9\n\022OSPolicyAs" + + "signment\022#OSPolicyAssignmentOperationMet" + + "adata\022\324\001\n\025GetOSPolicyAssignment\022;.google" + + ".cloud.osconfig.v1alpha.GetOSPolicyAssig" + + "nmentRequest\0321.google.cloud.osconfig.v1a" + + "lpha.OSPolicyAssignment\"K\202\323\344\223\002>\022.google" + + ".cloud.osconfig.v1alpha.ListOSPolicyAssi" + + "gnmentsResponse\"M\202\323\344\223\002>\022.goog" + + "le.cloud.osconfig.v1alpha.DeleteOSPolicy" + + "AssignmentRequest\032\035.google.longrunning.O" + + "peration\"\212\001\202\323\344\223\002>*\022.google.cloud.osconfi" + + "g.v1alpha.ListVulnerabilityReportsReques" + + "t\032?.google.cloud.osconfig.v1alpha.ListVu" + + "lnerabilityReportsResponse\"Z\202\323\344\223\002K\022I/v1a" + + "lpha/{parent=projects/*/locations/*/inst" + + "ances/*}/vulnerabilityReports\332A\006parent\032K" + + "\312A\027osconfig.googleapis.com\322A.https://www" + + ".googleapis.com/auth/cloud-platformB\314\002\n!" + + "com.google.cloud.osconfig.v1alphaB\031OsCon" + + "figZonalServiceProtoP\001ZEgoogle.golang.or" + + "g/genproto/googleapis/cloud/osconfig/v1a" + + "lpha;osconfig\252\002\035Google.Cloud.OsConfig.V1" + + "Alpha\312\002\035Google\\Cloud\\OsConfig\\V1alpha\352\002 " + + "Google::Cloud::OsConfig::V1alpha\352A_\n\037com" + + "pute.googleapis.com/Instance\022 + * A request message to update an OS policy assignment + * + * + * Protobuf type {@code google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} + */ +public final class UpdateOSPolicyAssignmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + UpdateOSPolicyAssignmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateOSPolicyAssignmentRequest.newBuilder() to construct. + private UpdateOSPolicyAssignmentRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateOSPolicyAssignmentRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateOSPolicyAssignmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateOSPolicyAssignmentRequest( + 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.v1alpha.OSPolicyAssignment.Builder subBuilder = null; + if (osPolicyAssignment_ != null) { + subBuilder = osPolicyAssignment_.toBuilder(); + } + osPolicyAssignment_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(osPolicyAssignment_); + osPolicyAssignment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + 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.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.Builder.class); + } + + public static final int OS_POLICY_ASSIGNMENT_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment osPolicyAssignment_; + /** + * + * + *
+   * Required. The updated OS policy assignment.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the osPolicyAssignment field is set. + */ + @java.lang.Override + public boolean hasOsPolicyAssignment() { + return osPolicyAssignment_ != null; + } + /** + * + * + *
+   * Required. The updated OS policy assignment.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The osPolicyAssignment. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignment() { + return osPolicyAssignment_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance() + : osPolicyAssignment_; + } + /** + * + * + *
+   * Required. The updated OS policy assignment.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentOrBuilder() { + return getOsPolicyAssignment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. Field mask that controls which fields of the assignment should be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. Field mask that controls which fields of the assignment should be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. Field mask that controls which fields of the assignment should be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (osPolicyAssignment_ != null) { + output.writeMessage(1, getOsPolicyAssignment()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (osPolicyAssignment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOsPolicyAssignment()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest other = + (com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) obj; + + if (hasOsPolicyAssignment() != other.hasOsPolicyAssignment()) return false; + if (hasOsPolicyAssignment()) { + if (!getOsPolicyAssignment().equals(other.getOsPolicyAssignment())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOsPolicyAssignment()) { + hash = (37 * hash) + OS_POLICY_ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + getOsPolicyAssignment().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest 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.v1alpha.UpdateOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest 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.v1alpha.UpdateOSPolicyAssignmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest 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.v1alpha.UpdateOSPolicyAssignmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + 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.v1alpha.UpdateOSPolicyAssignmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest 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.v1alpha.UpdateOSPolicyAssignmentRequest 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 update an OS policy assignment
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.class, + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.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 (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignment_ = null; + } else { + osPolicyAssignment_ = null; + osPolicyAssignmentBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.OSPolicyAssignments + .internal_static_google_cloud_osconfig_v1alpha_UpdateOSPolicyAssignmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest build() { + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest buildPartial() { + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest result = + new com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(this); + if (osPolicyAssignmentBuilder_ == null) { + result.osPolicyAssignment_ = osPolicyAssignment_; + } else { + result.osPolicyAssignment_ = osPolicyAssignmentBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest other) { + if (other + == com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest.getDefaultInstance()) + return this; + if (other.hasOsPolicyAssignment()) { + mergeOsPolicyAssignment(other.getOsPolicyAssignment()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1alpha.OSPolicyAssignment osPolicyAssignment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + osPolicyAssignmentBuilder_; + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the osPolicyAssignment field is set. + */ + public boolean hasOsPolicyAssignment() { + return osPolicyAssignmentBuilder_ != null || osPolicyAssignment_ != null; + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The osPolicyAssignment. + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignment() { + if (osPolicyAssignmentBuilder_ == null) { + return osPolicyAssignment_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance() + : osPolicyAssignment_; + } else { + return osPolicyAssignmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOsPolicyAssignment( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + osPolicyAssignment_ = value; + onChanged(); + } else { + osPolicyAssignmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOsPolicyAssignment( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder builderForValue) { + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignment_ = builderForValue.build(); + onChanged(); + } else { + osPolicyAssignmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOsPolicyAssignment( + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment value) { + if (osPolicyAssignmentBuilder_ == null) { + if (osPolicyAssignment_ != null) { + osPolicyAssignment_ = + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.newBuilder(osPolicyAssignment_) + .mergeFrom(value) + .buildPartial(); + } else { + osPolicyAssignment_ = value; + } + onChanged(); + } else { + osPolicyAssignmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOsPolicyAssignment() { + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignment_ = null; + onChanged(); + } else { + osPolicyAssignment_ = null; + osPolicyAssignmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder + getOsPolicyAssignmentBuilder() { + + onChanged(); + return getOsPolicyAssignmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder + getOsPolicyAssignmentOrBuilder() { + if (osPolicyAssignmentBuilder_ != null) { + return osPolicyAssignmentBuilder_.getMessageOrBuilder(); + } else { + return osPolicyAssignment_ == null + ? com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.getDefaultInstance() + : osPolicyAssignment_; + } + } + /** + * + * + *
+     * Required. The updated OS policy assignment.
+     * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder> + getOsPolicyAssignmentFieldBuilder() { + if (osPolicyAssignmentBuilder_ == null) { + osPolicyAssignmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.Builder, + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder>( + getOsPolicyAssignment(), getParentForChildren(), isClean()); + osPolicyAssignment_ = null; + } + return osPolicyAssignmentBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. Field mask that controls which fields of the assignment should be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + private static final com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest(); + } + + public static com.google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateOSPolicyAssignmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateOSPolicyAssignmentRequest(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.v1alpha.UpdateOSPolicyAssignmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequestOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequestOrBuilder.java new file mode 100644 index 00000000..59881fbc --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/UpdateOSPolicyAssignmentRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/osconfig/v1alpha/os_policy_assignments.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface UpdateOSPolicyAssignmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.UpdateOSPolicyAssignmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The updated OS policy assignment.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the osPolicyAssignment field is set. + */ + boolean hasOsPolicyAssignment(); + /** + * + * + *
+   * Required. The updated OS policy assignment.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The osPolicyAssignment. + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignment getOsPolicyAssignment(); + /** + * + * + *
+   * Required. The updated OS policy assignment.
+   * 
+ * + * + * .google.cloud.osconfig.v1alpha.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1alpha.OSPolicyAssignmentOrBuilder getOsPolicyAssignmentOrBuilder(); + + /** + * + * + *
+   * Optional. Field mask that controls which fields of the assignment should be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. Field mask that controls which fields of the assignment should be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. Field mask that controls which fields of the assignment should be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java new file mode 100644 index 00000000..33d8e578 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityProto.java @@ -0,0 +1,254 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +public final class VulnerabilityProto { + private VulnerabilityProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1alpha_CVSSv3_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1alpha_CVSSv3_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/osconfig/v1alpha/vulnerab" + + "ility.proto\022\035google.cloud.osconfig.v1alp" + + "ha\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\032\037google/protobuf/" + + "timestamp.proto\"\357\006\n\023VulnerabilityReport\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\003\022^\n\017vulnerabilities\030\002 " + + "\003(\0132@.google.cloud.osconfig.v1alpha.Vuln" + + "erabilityReport.VulnerabilityB\003\340A\003\0224\n\013up" + + "date_time\030\003 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\032\251\004\n\rVulnerability\022Y\n\007details\030\001 " + + "\001(\0132H.google.cloud.osconfig.v1alpha.Vuln" + + "erabilityReport.Vulnerability.Details\022$\n" + + "\034installed_inventory_item_ids\030\002 \003(\t\022$\n\034a" + + "vailable_inventory_item_ids\030\003 \003(\t\022/\n\013cre" + + "ate_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mp\022/\n\013update_time\030\005 \001(\0132\032.google.protobu" + + "f.Timestamp\032\216\002\n\007Details\022\013\n\003cve\030\001 \001(\t\022\025\n\r" + + "cvss_v2_score\030\002 \001(\002\0226\n\007cvss_v3\030\003 \001(\0132%.g" + + "oogle.cloud.osconfig.v1alpha.CVSSv3\022\020\n\010s" + + "everity\030\004 \001(\t\022\023\n\013description\030\005 \001(\t\022f\n\nre" + + "ferences\030\006 \003(\0132R.google.cloud.osconfig.v" + + "1alpha.VulnerabilityReport.Vulnerability" + + ".Details.Reference\032\030\n\tReference\022\013\n\003url\030\001" + + " \001(\t:\202\001\352A\177\n+osconfig.googleapis.com/Vuln" + + "erabilityReport\022Pprojects/{project}/loca" + + "tions/{location}/instances/{instance}/vu" + + "lnerabilityReport\"b\n\035GetVulnerabilityRep" + + "ortRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+osconf" + + "ig.googleapis.com/VulnerabilityReport\"\221\001" + + "\n\037ListVulnerabilityReportsRequest\0227\n\006par" + + "ent\030\001 \001(\tB\'\340A\002\372A!\n\037compute.googleapis.co" + + "m/Instance\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" + + "ken\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"\216\001\n ListVulner" + + "abilityReportsResponse\022Q\n\025vulnerability_" + + "reports\030\001 \003(\01322.google.cloud.osconfig.v1" + + "alpha.VulnerabilityReport\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"\335\n\n\006CVSSv3\022\022\n\nbase_score\030\001 \001(" + + "\002\022\034\n\024exploitability_score\030\002 \001(\002\022\024\n\014impac" + + "t_score\030\003 \001(\002\022I\n\rattack_vector\030\005 \001(\01622.g" + + "oogle.cloud.osconfig.v1alpha.CVSSv3.Atta" + + "ckVector\022Q\n\021attack_complexity\030\006 \001(\01626.go" + + "ogle.cloud.osconfig.v1alpha.CVSSv3.Attac" + + "kComplexity\022U\n\023privileges_required\030\007 \001(\016" + + "28.google.cloud.osconfig.v1alpha.CVSSv3." + + "PrivilegesRequired\022O\n\020user_interaction\030\010" + + " \001(\01625.google.cloud.osconfig.v1alpha.CVS" + + "Sv3.UserInteraction\022:\n\005scope\030\t \001(\0162+.goo" + + "gle.cloud.osconfig.v1alpha.CVSSv3.Scope\022" + + "L\n\026confidentiality_impact\030\n \001(\0162,.google" + + ".cloud.osconfig.v1alpha.CVSSv3.Impact\022F\n" + + "\020integrity_impact\030\013 \001(\0162,.google.cloud.o" + + "sconfig.v1alpha.CVSSv3.Impact\022I\n\023availab" + + "ility_impact\030\014 \001(\0162,.google.cloud.osconf" + + "ig.v1alpha.CVSSv3.Impact\"\231\001\n\014AttackVecto" + + "r\022\035\n\031ATTACK_VECTOR_UNSPECIFIED\020\000\022\031\n\025ATTA" + + "CK_VECTOR_NETWORK\020\001\022\032\n\026ATTACK_VECTOR_ADJ" + + "ACENT\020\002\022\027\n\023ATTACK_VECTOR_LOCAL\020\003\022\032\n\026ATTA" + + "CK_VECTOR_PHYSICAL\020\004\"l\n\020AttackComplexity" + + "\022!\n\035ATTACK_COMPLEXITY_UNSPECIFIED\020\000\022\031\n\025A" + + "TTACK_COMPLEXITY_LOW\020\001\022\032\n\026ATTACK_COMPLEX" + + "ITY_HIGH\020\002\"\222\001\n\022PrivilegesRequired\022#\n\037PRI" + + "VILEGES_REQUIRED_UNSPECIFIED\020\000\022\034\n\030PRIVIL" + + "EGES_REQUIRED_NONE\020\001\022\033\n\027PRIVILEGES_REQUI" + + "RED_LOW\020\002\022\034\n\030PRIVILEGES_REQUIRED_HIGH\020\003\"" + + "m\n\017UserInteraction\022 \n\034USER_INTERACTION_U" + + "NSPECIFIED\020\000\022\031\n\025USER_INTERACTION_NONE\020\001\022" + + "\035\n\031USER_INTERACTION_REQUIRED\020\002\"F\n\005Scope\022" + + "\025\n\021SCOPE_UNSPECIFIED\020\000\022\023\n\017SCOPE_UNCHANGE" + + "D\020\001\022\021\n\rSCOPE_CHANGED\020\002\"R\n\006Impact\022\026\n\022IMPA" + + "CT_UNSPECIFIED\020\000\022\017\n\013IMPACT_HIGH\020\001\022\016\n\nIMP" + + "ACT_LOW\020\002\022\017\n\013IMPACT_NONE\020\003B\343\001\n!com.googl" + + "e.cloud.osconfig.v1alphaB\022VulnerabilityP" + + "rotoP\001ZEgoogle.golang.org/genproto/googl" + + "eapis/cloud/osconfig/v1alpha;osconfig\252\002\035" + + "Google.Cloud.OsConfig.V1Alpha\312\002\035Google\\C" + + "loud\\OsConfig\\V1alpha\352\002 Google::Cloud::O" + + "sConfig::V1alphab\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.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor, + new java.lang.String[] { + "Name", "Vulnerabilities", "UpdateTime", + }); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor = + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor, + new java.lang.String[] { + "Details", + "InstalledInventoryItemIds", + "AvailableInventoryItemIds", + "CreateTime", + "UpdateTime", + }); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor = + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor, + new java.lang.String[] { + "Cve", "CvssV2Score", "CvssV3", "Severity", "Description", "References", + }); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor = + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor, + new java.lang.String[] { + "Url", + }); + internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_GetVulnerabilityReportRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_ListVulnerabilityReportsResponse_descriptor, + new java.lang.String[] { + "VulnerabilityReports", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1alpha_CVSSv3_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1alpha_CVSSv3_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1alpha_CVSSv3_descriptor, + new java.lang.String[] { + "BaseScore", + "ExploitabilityScore", + "ImpactScore", + "AttackVector", + "AttackComplexity", + "PrivilegesRequired", + "UserInteraction", + "Scope", + "ConfidentialityImpact", + "IntegrityImpact", + "AvailabilityImpact", + }); + 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.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java new file mode 100644 index 00000000..fef79120 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReport.java @@ -0,0 +1,6730 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +/** + * + * + *
+ * This API resource represents the vulnerability report for a specified
+ * Compute Engine virtual machine (VM) instance at a given point in time.
+ * For more information, see [Vulnerability
+ * reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).
+ * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport} + */ +public final class VulnerabilityReport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport) + VulnerabilityReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use VulnerabilityReport.newBuilder() to construct. + private VulnerabilityReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VulnerabilityReport() { + name_ = ""; + vulnerabilities_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VulnerabilityReport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VulnerabilityReport( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vulnerabilities_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability>(); + mutable_bitField0_ |= 0x00000001; + } + vulnerabilities_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.parser(), + extensionRegistry)); + break; + } + case 26: + { + 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; + } + 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)) { + vulnerabilities_ = java.util.Collections.unmodifiableList(vulnerabilities_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder.class); + } + + public interface VulnerabilityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return Whether the details field is set. + */ + boolean hasDetails(); + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return The details. + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details getDetails(); + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder + getDetailsOrBuilder(); + + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return A list containing the installedInventoryItemIds. + */ + java.util.List getInstalledInventoryItemIdsList(); + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return The count of installedInventoryItemIds. + */ + int getInstalledInventoryItemIdsCount(); + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index of the element to return. + * @return The installedInventoryItemIds at the given index. + */ + java.lang.String getInstalledInventoryItemIds(int index); + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the installedInventoryItemIds at the given index. + */ + com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int index); + + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return A list containing the availableInventoryItemIds. + */ + java.util.List getAvailableInventoryItemIdsList(); + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return The count of availableInventoryItemIds. + */ + int getAvailableInventoryItemIdsCount(); + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index of the element to return. + * @return The availableInventoryItemIds at the given index. + */ + java.lang.String getAvailableInventoryItemIds(int index); + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableInventoryItemIds at the given index. + */ + com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int index); + + /** + * + * + *
+     * The timestamp for when the vulnerability was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * The timestamp for when the vulnerability was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * The timestamp for when the vulnerability was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * The timestamp for when the vulnerability was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * The timestamp for when the vulnerability was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * The timestamp for when the vulnerability was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + } + /** + * + * + *
+   * A vulnerability affecting the VM instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} + */ + public static final class Vulnerability extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + VulnerabilityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Vulnerability.newBuilder() to construct. + private Vulnerability(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Vulnerability() { + installedInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + availableInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Vulnerability(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Vulnerability( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Builder + subBuilder = null; + if (details_ != null) { + subBuilder = details_.toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(details_); + details_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + installedInventoryItemIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + installedInventoryItemIds_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + availableInventoryItemIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + availableInventoryItemIds_.add(s); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + 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)) { + installedInventoryItemIds_ = installedInventoryItemIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + availableInventoryItemIds_ = availableInventoryItemIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder.class); + } + + public interface DetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The CVE of the vulnerability. CVE cannot be
+       * empty and the combination of <cve, classification> should be unique
+       * across vulnerabilities for a VM.
+       * 
+ * + * string cve = 1; + * + * @return The cve. + */ + java.lang.String getCve(); + /** + * + * + *
+       * The CVE of the vulnerability. CVE cannot be
+       * empty and the combination of <cve, classification> should be unique
+       * across vulnerabilities for a VM.
+       * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + com.google.protobuf.ByteString getCveBytes(); + + /** + * + * + *
+       * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of
+       * 0 - 10 where 0 indicates low severity and 10 indicates high severity.
+       * 
+ * + * float cvss_v2_score = 2; + * + * @return The cvssV2Score. + */ + float getCvssV2Score(); + + /** + * + * + *
+       * The full description of the CVSSv3 for this vulnerability from NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + * + * @return Whether the cvssV3 field is set. + */ + boolean hasCvssV3(); + /** + * + * + *
+       * The full description of the CVSSv3 for this vulnerability from NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + * + * @return The cvssV3. + */ + com.google.cloud.osconfig.v1alpha.CVSSv3 getCvssV3(); + /** + * + * + *
+       * The full description of the CVSSv3 for this vulnerability from NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder getCvssV3OrBuilder(); + + /** + * + * + *
+       * Assigned severity/impact ranking from the distro.
+       * 
+ * + * string severity = 4; + * + * @return The severity. + */ + java.lang.String getSeverity(); + /** + * + * + *
+       * Assigned severity/impact ranking from the distro.
+       * 
+ * + * string severity = 4; + * + * @return The bytes for severity. + */ + com.google.protobuf.ByteString getSeverityBytes(); + + /** + * + * + *
+       * The note or description describing the vulnerability from the distro.
+       * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+       * The note or description describing the vulnerability from the distro.
+       * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference> + getReferencesList(); + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + getReferences(int index); + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + int getReferencesCount(); + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder> + getReferencesOrBuilderList(); + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.ReferenceOrBuilder + getReferencesOrBuilder(int index); + } + /** + * + * + *
+     * Contains metadata information for the vulnerability. This information is
+     * collected from the upstream feed of the operating system.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} + */ + public static final class Details extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + DetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Details.newBuilder() to construct. + private Details(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Details() { + cve_ = ""; + severity_ = ""; + description_ = ""; + references_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Details(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Details( + 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(); + + cve_ = s; + break; + } + case 21: + { + cvssV2Score_ = input.readFloat(); + break; + } + case 26: + { + com.google.cloud.osconfig.v1alpha.CVSSv3.Builder subBuilder = null; + if (cvssV3_ != null) { + subBuilder = cvssV3_.toBuilder(); + } + cvssV3_ = + input.readMessage( + com.google.cloud.osconfig.v1alpha.CVSSv3.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cvssV3_); + cvssV3_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + severity_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + references_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .Details.Reference>(); + mutable_bitField0_ |= 0x00000001; + } + references_.add( + input.readMessage( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .Details.Reference.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + references_ = java.util.Collections.unmodifiableList(references_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Builder + .class); + } + + public interface ReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * The url of the reference.
+         * 
+ * + * string url = 1; + * + * @return The url. + */ + java.lang.String getUrl(); + /** + * + * + *
+         * The url of the reference.
+         * 
+ * + * string url = 1; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); + } + /** + * + * + *
+       * A reference for this vulnerability.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} + */ + public static final class Reference extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + ReferenceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Reference.newBuilder() to construct. + private Reference(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Reference() { + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Reference(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Reference( + 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(); + + url_ = 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.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + * + * + *
+         * The url of the reference.
+         * 
+ * + * string url = 1; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * + * + *
+         * The url of the reference.
+         * 
+ * + * string url = 1; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = 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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + other = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference) + obj; + + if (!getUrl().equals(other.getUrl())) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + 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.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + 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 reference for this vulnerability.
+         * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference.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(); + url_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_Reference_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + build() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + buildPartial() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + result = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference(this); + result.url_ = url_; + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + other) { + if (other + == com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + 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.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + * + * + *
+           * The url of the reference.
+           * 
+ * + * string url = 1; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The url of the reference.
+           * 
+ * + * string url = 1; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The url of the reference.
+           * 
+ * + * string url = 1; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * The url of the reference.
+           * 
+ * + * string url = 1; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + * + * + *
+           * The url of the reference.
+           * 
+ * + * string url = 1; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = 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.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference) + private static final com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .Details.Reference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference(); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Reference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Reference(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.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CVE_FIELD_NUMBER = 1; + private volatile java.lang.Object cve_; + /** + * + * + *
+       * The CVE of the vulnerability. CVE cannot be
+       * empty and the combination of <cve, classification> should be unique
+       * across vulnerabilities for a VM.
+       * 
+ * + * string cve = 1; + * + * @return The cve. + */ + @java.lang.Override + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } + } + /** + * + * + *
+       * The CVE of the vulnerability. CVE cannot be
+       * empty and the combination of <cve, classification> should be unique
+       * across vulnerabilities for a VM.
+       * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CVSS_V2_SCORE_FIELD_NUMBER = 2; + private float cvssV2Score_; + /** + * + * + *
+       * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of
+       * 0 - 10 where 0 indicates low severity and 10 indicates high severity.
+       * 
+ * + * float cvss_v2_score = 2; + * + * @return The cvssV2Score. + */ + @java.lang.Override + public float getCvssV2Score() { + return cvssV2Score_; + } + + public static final int CVSS_V3_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1alpha.CVSSv3 cvssV3_; + /** + * + * + *
+       * The full description of the CVSSv3 for this vulnerability from NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + * + * @return Whether the cvssV3 field is set. + */ + @java.lang.Override + public boolean hasCvssV3() { + return cvssV3_ != null; + } + /** + * + * + *
+       * The full description of the CVSSv3 for this vulnerability from NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + * + * @return The cvssV3. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3 getCvssV3() { + return cvssV3_ == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.getDefaultInstance() + : cvssV3_; + } + /** + * + * + *
+       * The full description of the CVSSv3 for this vulnerability from NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder getCvssV3OrBuilder() { + return getCvssV3(); + } + + public static final int SEVERITY_FIELD_NUMBER = 4; + private volatile java.lang.Object severity_; + /** + * + * + *
+       * Assigned severity/impact ranking from the distro.
+       * 
+ * + * string severity = 4; + * + * @return The severity. + */ + @java.lang.Override + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } + } + /** + * + * + *
+       * Assigned severity/impact ranking from the distro.
+       * 
+ * + * string severity = 4; + * + * @return The bytes for severity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + * + * + *
+       * The note or description describing the vulnerability from the distro.
+       * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+       * The note or description describing the vulnerability from the distro.
+       * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERENCES_FIELD_NUMBER = 6; + private java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference> + references_; + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference> + getReferencesList() { + return references_; + } + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder> + getReferencesOrBuilderList() { + return references_; + } + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + @java.lang.Override + public int getReferencesCount() { + return references_.size(); + } + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + getReferences(int index) { + return references_.get(index); + } + /** + * + * + *
+       * Corresponds to the references attached to the `VulnerabilityDetails`.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder + getReferencesOrBuilder(int index) { + return references_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getCveBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cve_); + } + if (cvssV2Score_ != 0F) { + output.writeFloat(2, cvssV2Score_); + } + if (cvssV3_ != null) { + output.writeMessage(3, getCvssV3()); + } + if (!getSeverityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, severity_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + for (int i = 0; i < references_.size(); i++) { + output.writeMessage(6, references_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCveBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cve_); + } + if (cvssV2Score_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, cvssV2Score_); + } + if (cvssV3_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCvssV3()); + } + if (!getSeverityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, severity_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + for (int i = 0; i < references_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, references_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details other = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) obj; + + if (!getCve().equals(other.getCve())) return false; + if (java.lang.Float.floatToIntBits(getCvssV2Score()) + != java.lang.Float.floatToIntBits(other.getCvssV2Score())) return false; + if (hasCvssV3() != other.hasCvssV3()) return false; + if (hasCvssV3()) { + if (!getCvssV3().equals(other.getCvssV3())) return false; + } + if (!getSeverity().equals(other.getSeverity())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getReferencesList().equals(other.getReferencesList())) 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) + CVE_FIELD_NUMBER; + hash = (53 * hash) + getCve().hashCode(); + hash = (37 * hash) + CVSS_V2_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCvssV2Score()); + if (hasCvssV3()) { + hash = (37 * hash) + CVSS_V3_FIELD_NUMBER; + hash = (53 * hash) + getCvssV3().hashCode(); + } + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + getSeverity().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getReferencesCount() > 0) { + hash = (37 * hash) + REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getReferencesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + 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.v1alpha.VulnerabilityReport.Vulnerability.Details 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; + } + /** + * + * + *
+       * Contains metadata information for the vulnerability. This information is
+       * collected from the upstream feed of the operating system.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReferencesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cve_ = ""; + + cvssV2Score_ = 0F; + + if (cvssV3Builder_ == null) { + cvssV3_ = null; + } else { + cvssV3_ = null; + cvssV3Builder_ = null; + } + severity_ = ""; + + description_ = ""; + + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + referencesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_Details_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details build() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + buildPartial() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details result = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(this); + int from_bitField0_ = bitField0_; + result.cve_ = cve_; + result.cvssV2Score_ = cvssV2Score_; + if (cvssV3Builder_ == null) { + result.cvssV3_ = cvssV3_; + } else { + result.cvssV3_ = cvssV3Builder_.build(); + } + result.severity_ = severity_; + result.description_ = description_; + if (referencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + references_ = java.util.Collections.unmodifiableList(references_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.references_ = references_; + } else { + result.references_ = referencesBuilder_.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.v1alpha.VulnerabilityReport.Vulnerability.Details) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details other) { + if (other + == com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .getDefaultInstance()) return this; + if (!other.getCve().isEmpty()) { + cve_ = other.cve_; + onChanged(); + } + if (other.getCvssV2Score() != 0F) { + setCvssV2Score(other.getCvssV2Score()); + } + if (other.hasCvssV3()) { + mergeCvssV3(other.getCvssV3()); + } + if (!other.getSeverity().isEmpty()) { + severity_ = other.severity_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (referencesBuilder_ == null) { + if (!other.references_.isEmpty()) { + if (references_.isEmpty()) { + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReferencesIsMutable(); + references_.addAll(other.references_); + } + onChanged(); + } + } else { + if (!other.references_.isEmpty()) { + if (referencesBuilder_.isEmpty()) { + referencesBuilder_.dispose(); + referencesBuilder_ = null; + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000001); + referencesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReferencesFieldBuilder() + : null; + } else { + referencesBuilder_.addAllMessages(other.references_); + } + } + } + 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.v1alpha.VulnerabilityReport.Vulnerability.Details + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object cve_ = ""; + /** + * + * + *
+         * The CVE of the vulnerability. CVE cannot be
+         * empty and the combination of <cve, classification> should be unique
+         * across vulnerabilities for a VM.
+         * 
+ * + * string cve = 1; + * + * @return The cve. + */ + public java.lang.String getCve() { + java.lang.Object ref = cve_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cve_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The CVE of the vulnerability. CVE cannot be
+         * empty and the combination of <cve, classification> should be unique
+         * across vulnerabilities for a VM.
+         * 
+ * + * string cve = 1; + * + * @return The bytes for cve. + */ + public com.google.protobuf.ByteString getCveBytes() { + java.lang.Object ref = cve_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cve_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The CVE of the vulnerability. CVE cannot be
+         * empty and the combination of <cve, classification> should be unique
+         * across vulnerabilities for a VM.
+         * 
+ * + * string cve = 1; + * + * @param value The cve to set. + * @return This builder for chaining. + */ + public Builder setCve(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cve_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The CVE of the vulnerability. CVE cannot be
+         * empty and the combination of <cve, classification> should be unique
+         * across vulnerabilities for a VM.
+         * 
+ * + * string cve = 1; + * + * @return This builder for chaining. + */ + public Builder clearCve() { + + cve_ = getDefaultInstance().getCve(); + onChanged(); + return this; + } + /** + * + * + *
+         * The CVE of the vulnerability. CVE cannot be
+         * empty and the combination of <cve, classification> should be unique
+         * across vulnerabilities for a VM.
+         * 
+ * + * string cve = 1; + * + * @param value The bytes for cve to set. + * @return This builder for chaining. + */ + public Builder setCveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cve_ = value; + onChanged(); + return this; + } + + private float cvssV2Score_; + /** + * + * + *
+         * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of
+         * 0 - 10 where 0 indicates low severity and 10 indicates high severity.
+         * 
+ * + * float cvss_v2_score = 2; + * + * @return The cvssV2Score. + */ + @java.lang.Override + public float getCvssV2Score() { + return cvssV2Score_; + } + /** + * + * + *
+         * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of
+         * 0 - 10 where 0 indicates low severity and 10 indicates high severity.
+         * 
+ * + * float cvss_v2_score = 2; + * + * @param value The cvssV2Score to set. + * @return This builder for chaining. + */ + public Builder setCvssV2Score(float value) { + + cvssV2Score_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of
+         * 0 - 10 where 0 indicates low severity and 10 indicates high severity.
+         * 
+ * + * float cvss_v2_score = 2; + * + * @return This builder for chaining. + */ + public Builder clearCvssV2Score() { + + cvssV2Score_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1alpha.CVSSv3 cvssV3_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.CVSSv3, + com.google.cloud.osconfig.v1alpha.CVSSv3.Builder, + com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder> + cvssV3Builder_; + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + * + * @return Whether the cvssV3 field is set. + */ + public boolean hasCvssV3() { + return cvssV3Builder_ != null || cvssV3_ != null; + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + * + * @return The cvssV3. + */ + public com.google.cloud.osconfig.v1alpha.CVSSv3 getCvssV3() { + if (cvssV3Builder_ == null) { + return cvssV3_ == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.getDefaultInstance() + : cvssV3_; + } else { + return cvssV3Builder_.getMessage(); + } + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + public Builder setCvssV3(com.google.cloud.osconfig.v1alpha.CVSSv3 value) { + if (cvssV3Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cvssV3_ = value; + onChanged(); + } else { + cvssV3Builder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + public Builder setCvssV3(com.google.cloud.osconfig.v1alpha.CVSSv3.Builder builderForValue) { + if (cvssV3Builder_ == null) { + cvssV3_ = builderForValue.build(); + onChanged(); + } else { + cvssV3Builder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + public Builder mergeCvssV3(com.google.cloud.osconfig.v1alpha.CVSSv3 value) { + if (cvssV3Builder_ == null) { + if (cvssV3_ != null) { + cvssV3_ = + com.google.cloud.osconfig.v1alpha.CVSSv3.newBuilder(cvssV3_) + .mergeFrom(value) + .buildPartial(); + } else { + cvssV3_ = value; + } + onChanged(); + } else { + cvssV3Builder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + public Builder clearCvssV3() { + if (cvssV3Builder_ == null) { + cvssV3_ = null; + onChanged(); + } else { + cvssV3_ = null; + cvssV3Builder_ = null; + } + + return this; + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + public com.google.cloud.osconfig.v1alpha.CVSSv3.Builder getCvssV3Builder() { + + onChanged(); + return getCvssV3FieldBuilder().getBuilder(); + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + public com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder getCvssV3OrBuilder() { + if (cvssV3Builder_ != null) { + return cvssV3Builder_.getMessageOrBuilder(); + } else { + return cvssV3_ == null + ? com.google.cloud.osconfig.v1alpha.CVSSv3.getDefaultInstance() + : cvssV3_; + } + } + /** + * + * + *
+         * The full description of the CVSSv3 for this vulnerability from NVD.
+         * 
+ * + * .google.cloud.osconfig.v1alpha.CVSSv3 cvss_v3 = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.CVSSv3, + com.google.cloud.osconfig.v1alpha.CVSSv3.Builder, + com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder> + getCvssV3FieldBuilder() { + if (cvssV3Builder_ == null) { + cvssV3Builder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.CVSSv3, + com.google.cloud.osconfig.v1alpha.CVSSv3.Builder, + com.google.cloud.osconfig.v1alpha.CVSSv3OrBuilder>( + getCvssV3(), getParentForChildren(), isClean()); + cvssV3_ = null; + } + return cvssV3Builder_; + } + + private java.lang.Object severity_ = ""; + /** + * + * + *
+         * Assigned severity/impact ranking from the distro.
+         * 
+ * + * string severity = 4; + * + * @return The severity. + */ + public java.lang.String getSeverity() { + java.lang.Object ref = severity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + severity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Assigned severity/impact ranking from the distro.
+         * 
+ * + * string severity = 4; + * + * @return The bytes for severity. + */ + public com.google.protobuf.ByteString getSeverityBytes() { + java.lang.Object ref = severity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + severity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Assigned severity/impact ranking from the distro.
+         * 
+ * + * string severity = 4; + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + severity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Assigned severity/impact ranking from the distro.
+         * 
+ * + * string severity = 4; + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + + severity_ = getDefaultInstance().getSeverity(); + onChanged(); + return this; + } + /** + * + * + *
+         * Assigned severity/impact ranking from the distro.
+         * 
+ * + * string severity = 4; + * + * @param value The bytes for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + severity_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+         * The note or description describing the vulnerability from the distro.
+         * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The note or description describing the vulnerability from the distro.
+         * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The note or description describing the vulnerability from the distro.
+         * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The note or description describing the vulnerability from the distro.
+         * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+         * The note or description describing the vulnerability from the distro.
+         * 
+ * + * string description = 5; + * + * @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 java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference> + references_ = java.util.Collections.emptyList(); + + private void ensureReferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + references_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference>(references_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder> + referencesBuilder_; + + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference> + getReferencesList() { + if (referencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(references_); + } else { + return referencesBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public int getReferencesCount() { + if (referencesBuilder_ == null) { + return references_.size(); + } else { + return referencesBuilder_.getCount(); + } + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + getReferences(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder setReferences( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.set(index, value); + onChanged(); + } else { + referencesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder setReferences( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + .Builder + builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.set(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder addReferences( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(value); + onChanged(); + } else { + referencesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder addReferences( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(index, value); + onChanged(); + } else { + referencesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder addReferences( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + .Builder + builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder addReferences( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + .Builder + builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder addAllReferences( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference> + values) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); + onChanged(); + } else { + referencesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder clearReferences() { + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + referencesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public Builder removeReferences(int index) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.remove(index); + onChanged(); + } else { + referencesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + .Builder + getReferencesBuilder(int index) { + return getReferencesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder + getReferencesOrBuilder(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder> + getReferencesOrBuilderList() { + if (referencesBuilder_ != null) { + return referencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(references_); + } + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + .Builder + addReferencesBuilder() { + return getReferencesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.getDefaultInstance()); + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference + .Builder + addReferencesBuilder(int index) { + return getReferencesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.getDefaultInstance()); + } + /** + * + * + *
+         * Corresponds to the references attached to the `VulnerabilityDetails`.
+         * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.Builder> + getReferencesBuilderList() { + return getReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder> + getReferencesFieldBuilder() { + if (referencesBuilder_ == null) { + referencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Reference.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .ReferenceOrBuilder>( + references_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + references_ = null; + } + return referencesBuilder_; + } + + @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.v1alpha.VulnerabilityReport.Vulnerability.Details) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details) + private static final com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .Details + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details(); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
PARSER = + new com.google.protobuf.AbstractParser
() { + @java.lang.Override + public Details parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Details(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.v1alpha.VulnerabilityReport.Vulnerability.Details + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DETAILS_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details_; + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return Whether the details field is set. + */ + @java.lang.Override + public boolean hasDetails() { + return details_ != null; + } + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return The details. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + getDetails() { + return details_ == null + ? com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .getDefaultInstance() + : details_; + } + /** + * + * + *
+     * Contains metadata as per the upstream feed of the operating system and
+     * NVD.
+     * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder + getDetailsOrBuilder() { + return getDetails(); + } + + public static final int INSTALLED_INVENTORY_ITEM_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList installedInventoryItemIds_; + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return A list containing the installedInventoryItemIds. + */ + public com.google.protobuf.ProtocolStringList getInstalledInventoryItemIdsList() { + return installedInventoryItemIds_; + } + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return The count of installedInventoryItemIds. + */ + public int getInstalledInventoryItemIdsCount() { + return installedInventoryItemIds_.size(); + } + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index of the element to return. + * @return The installedInventoryItemIds at the given index. + */ + public java.lang.String getInstalledInventoryItemIds(int index) { + return installedInventoryItemIds_.get(index); + } + /** + * + * + *
+     * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+     * This field displays the inventory items affected by this vulnerability.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. For some distros,
+     * this field may be empty.
+     * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the installedInventoryItemIds at the given index. + */ + public com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int index) { + return installedInventoryItemIds_.getByteString(index); + } + + public static final int AVAILABLE_INVENTORY_ITEM_IDS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList availableInventoryItemIds_; + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return A list containing the availableInventoryItemIds. + */ + public com.google.protobuf.ProtocolStringList getAvailableInventoryItemIdsList() { + return availableInventoryItemIds_; + } + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return The count of availableInventoryItemIds. + */ + public int getAvailableInventoryItemIdsCount() { + return availableInventoryItemIds_.size(); + } + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index of the element to return. + * @return The availableInventoryItemIds at the given index. + */ + public java.lang.String getAvailableInventoryItemIds(int index) { + return availableInventoryItemIds_.get(index); + } + /** + * + * + *
+     * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+     * If the vulnerability report was not updated after the VM inventory
+     * update, these values might not display in VM inventory. If there is no
+     * available fix, the field is empty. The `inventory_item` value specifies
+     * the latest `SoftwarePackage` available to the VM that fixes the
+     * vulnerability.
+     * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableInventoryItemIds at the given index. + */ + public com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int index) { + return availableInventoryItemIds_.getByteString(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * The timestamp for when the vulnerability was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * The timestamp for when the vulnerability was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * The timestamp for when the vulnerability was first detected.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * The timestamp for when the vulnerability was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * The timestamp for when the vulnerability was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * The timestamp for when the vulnerability was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + 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 (details_ != null) { + output.writeMessage(1, getDetails()); + } + for (int i = 0; i < installedInventoryItemIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, installedInventoryItemIds_.getRaw(i)); + } + for (int i = 0; i < availableInventoryItemIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, availableInventoryItemIds_.getRaw(i)); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (details_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDetails()); + } + { + int dataSize = 0; + for (int i = 0; i < installedInventoryItemIds_.size(); i++) { + dataSize += computeStringSizeNoTag(installedInventoryItemIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getInstalledInventoryItemIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < availableInventoryItemIds_.size(); i++) { + dataSize += computeStringSizeNoTag(availableInventoryItemIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvailableInventoryItemIdsList().size(); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + 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.v1alpha.VulnerabilityReport.Vulnerability)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability other = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) obj; + + if (hasDetails() != other.hasDetails()) return false; + if (hasDetails()) { + if (!getDetails().equals(other.getDetails())) return false; + } + if (!getInstalledInventoryItemIdsList().equals(other.getInstalledInventoryItemIdsList())) + return false; + if (!getAvailableInventoryItemIdsList().equals(other.getAvailableInventoryItemIdsList())) + 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 (!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 (hasDetails()) { + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + } + if (getInstalledInventoryItemIdsCount() > 0) { + hash = (37 * hash) + INSTALLED_INVENTORY_ITEM_IDS_FIELD_NUMBER; + hash = (53 * hash) + getInstalledInventoryItemIdsList().hashCode(); + } + if (getAvailableInventoryItemIdsCount() > 0) { + hash = (37 * hash) + AVAILABLE_INVENTORY_ITEM_IDS_FIELD_NUMBER; + hash = (53 * hash) + getAvailableInventoryItemIdsList().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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability 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.v1alpha.VulnerabilityReport.Vulnerability parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability 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.v1alpha.VulnerabilityReport.Vulnerability parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability 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.v1alpha.VulnerabilityReport.Vulnerability + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + 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.v1alpha.VulnerabilityReport.Vulnerability parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability 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.v1alpha.VulnerabilityReport.Vulnerability 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 vulnerability affecting the VM instance.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.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 (detailsBuilder_ == null) { + details_ = null; + } else { + details_ = null; + detailsBuilder_ = null; + } + installedInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + availableInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_Vulnerability_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability build() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability buildPartial() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability result = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(this); + int from_bitField0_ = bitField0_; + if (detailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = detailsBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + installedInventoryItemIds_ = installedInventoryItemIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.installedInventoryItemIds_ = installedInventoryItemIds_; + if (((bitField0_ & 0x00000002) != 0)) { + availableInventoryItemIds_ = availableInventoryItemIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.availableInventoryItemIds_ = availableInventoryItemIds_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.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.v1alpha.VulnerabilityReport.Vulnerability) { + return mergeFrom( + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability other) { + if (other + == com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .getDefaultInstance()) return this; + if (other.hasDetails()) { + mergeDetails(other.getDetails()); + } + if (!other.installedInventoryItemIds_.isEmpty()) { + if (installedInventoryItemIds_.isEmpty()) { + installedInventoryItemIds_ = other.installedInventoryItemIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstalledInventoryItemIdsIsMutable(); + installedInventoryItemIds_.addAll(other.installedInventoryItemIds_); + } + onChanged(); + } + if (!other.availableInventoryItemIds_.isEmpty()) { + if (availableInventoryItemIds_.isEmpty()) { + availableInventoryItemIds_ = other.availableInventoryItemIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAvailableInventoryItemIdsIsMutable(); + availableInventoryItemIds_.addAll(other.availableInventoryItemIds_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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.v1alpha.VulnerabilityReport.Vulnerability parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder> + detailsBuilder_; + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return Whether the details field is set. + */ + public boolean hasDetails() { + return detailsBuilder_ != null || details_ != null; + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + * + * @return The details. + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + getDetails() { + if (detailsBuilder_ == null) { + return details_ == null + ? com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .getDefaultInstance() + : details_; + } else { + return detailsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + public Builder setDetails( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details value) { + if (detailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + detailsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + public Builder setDetails( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Builder + builderForValue) { + if (detailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + detailsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + public Builder mergeDetails( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details value) { + if (detailsBuilder_ == null) { + if (details_ != null) { + details_ = + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .newBuilder(details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + detailsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + public Builder clearDetails() { + if (detailsBuilder_ == null) { + details_ = null; + onChanged(); + } else { + details_ = null; + detailsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Builder + getDetailsBuilder() { + + onChanged(); + return getDetailsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder + getDetailsOrBuilder() { + if (detailsBuilder_ != null) { + return detailsBuilder_.getMessageOrBuilder(); + } else { + return details_ == null + ? com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .getDefaultInstance() + : details_; + } + } + /** + * + * + *
+       * Contains metadata as per the upstream feed of the operating system and
+       * NVD.
+       * 
+ * + * .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details details = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.DetailsOrBuilder> + getDetailsFieldBuilder() { + if (detailsBuilder_ == null) { + detailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Details + .Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .DetailsOrBuilder>(getDetails(), getParentForChildren(), isClean()); + details_ = null; + } + return detailsBuilder_; + } + + private com.google.protobuf.LazyStringList installedInventoryItemIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstalledInventoryItemIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + installedInventoryItemIds_ = + new com.google.protobuf.LazyStringArrayList(installedInventoryItemIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return A list containing the installedInventoryItemIds. + */ + public com.google.protobuf.ProtocolStringList getInstalledInventoryItemIdsList() { + return installedInventoryItemIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return The count of installedInventoryItemIds. + */ + public int getInstalledInventoryItemIdsCount() { + return installedInventoryItemIds_.size(); + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index of the element to return. + * @return The installedInventoryItemIds at the given index. + */ + public java.lang.String getInstalledInventoryItemIds(int index) { + return installedInventoryItemIds_.get(index); + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the installedInventoryItemIds at the given index. + */ + public com.google.protobuf.ByteString getInstalledInventoryItemIdsBytes(int index) { + return installedInventoryItemIds_.getByteString(index); + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param index The index to set the value at. + * @param value The installedInventoryItemIds to set. + * @return This builder for chaining. + */ + public Builder setInstalledInventoryItemIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledInventoryItemIdsIsMutable(); + installedInventoryItemIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param value The installedInventoryItemIds to add. + * @return This builder for chaining. + */ + public Builder addInstalledInventoryItemIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledInventoryItemIdsIsMutable(); + installedInventoryItemIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param values The installedInventoryItemIds to add. + * @return This builder for chaining. + */ + public Builder addAllInstalledInventoryItemIds(java.lang.Iterable values) { + ensureInstalledInventoryItemIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, installedInventoryItemIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstalledInventoryItemIds() { + installedInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM.
+       * This field displays the inventory items affected by this vulnerability.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. For some distros,
+       * this field may be empty.
+       * 
+ * + * repeated string installed_inventory_item_ids = 2; + * + * @param value The bytes of the installedInventoryItemIds to add. + * @return This builder for chaining. + */ + public Builder addInstalledInventoryItemIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInstalledInventoryItemIdsIsMutable(); + installedInventoryItemIds_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList availableInventoryItemIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAvailableInventoryItemIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + availableInventoryItemIds_ = + new com.google.protobuf.LazyStringArrayList(availableInventoryItemIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return A list containing the availableInventoryItemIds. + */ + public com.google.protobuf.ProtocolStringList getAvailableInventoryItemIdsList() { + return availableInventoryItemIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return The count of availableInventoryItemIds. + */ + public int getAvailableInventoryItemIdsCount() { + return availableInventoryItemIds_.size(); + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index of the element to return. + * @return The availableInventoryItemIds at the given index. + */ + public java.lang.String getAvailableInventoryItemIds(int index) { + return availableInventoryItemIds_.get(index); + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index of the value to return. + * @return The bytes of the availableInventoryItemIds at the given index. + */ + public com.google.protobuf.ByteString getAvailableInventoryItemIdsBytes(int index) { + return availableInventoryItemIds_.getByteString(index); + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param index The index to set the value at. + * @param value The availableInventoryItemIds to set. + * @return This builder for chaining. + */ + public Builder setAvailableInventoryItemIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableInventoryItemIdsIsMutable(); + availableInventoryItemIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param value The availableInventoryItemIds to add. + * @return This builder for chaining. + */ + public Builder addAvailableInventoryItemIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAvailableInventoryItemIdsIsMutable(); + availableInventoryItemIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param values The availableInventoryItemIds to add. + * @return This builder for chaining. + */ + public Builder addAllAvailableInventoryItemIds(java.lang.Iterable values) { + ensureAvailableInventoryItemIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, availableInventoryItemIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @return This builder for chaining. + */ + public Builder clearAvailableInventoryItemIds() { + availableInventoryItemIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM.
+       * If the vulnerability report was not updated after the VM inventory
+       * update, these values might not display in VM inventory. If there is no
+       * available fix, the field is empty. The `inventory_item` value specifies
+       * the latest `SoftwarePackage` available to the VM that fixes the
+       * vulnerability.
+       * 
+ * + * repeated string available_inventory_item_ids = 3; + * + * @param value The bytes of the availableInventoryItemIds to add. + * @return This builder for chaining. + */ + public Builder addAvailableInventoryItemIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAvailableInventoryItemIdsIsMutable(); + availableInventoryItemIds_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_) + .mergeFrom(value) + .buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+       * The timestamp for when the vulnerability was first detected.
+       * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + 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_; + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + * + * @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(); + } + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + 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; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + 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; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+       * The timestamp for when the vulnerability was last modified.
+       * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + 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_; + } + + @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.v1alpha.VulnerabilityReport.Vulnerability) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability) + private static final com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability(); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vulnerability parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vulnerability(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.v1alpha.VulnerabilityReport.Vulnerability + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The `vulnerabilityReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The `vulnerabilityReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VULNERABILITIES_FIELD_NUMBER = 2; + private java.util.List + vulnerabilities_; + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getVulnerabilitiesList() { + return vulnerabilities_; + } + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder> + getVulnerabilitiesOrBuilderList() { + return vulnerabilities_; + } + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getVulnerabilitiesCount() { + return vulnerabilities_.size(); + } + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability getVulnerabilities( + int index) { + return vulnerabilities_.get(index); + } + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder + getVulnerabilitiesOrBuilder(int index) { + return vulnerabilities_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The timestamp for when the last vulnerability report was
+   * generated for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp for when the last vulnerability report was
+   * generated for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The timestamp for when the last vulnerability report was
+   * generated for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < vulnerabilities_.size(); i++) { + output.writeMessage(2, vulnerabilities_.get(i)); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < vulnerabilities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, vulnerabilities_.get(i)); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + 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.v1alpha.VulnerabilityReport)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1alpha.VulnerabilityReport other = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVulnerabilitiesList().equals(other.getVulnerabilitiesList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getVulnerabilitiesCount() > 0) { + hash = (37 * hash) + VULNERABILITIES_FIELD_NUMBER; + hash = (53 * hash) + getVulnerabilitiesList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport 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.v1alpha.VulnerabilityReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport 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.v1alpha.VulnerabilityReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport 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.v1alpha.VulnerabilityReport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport 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.v1alpha.VulnerabilityReport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport 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.v1alpha.VulnerabilityReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * This API resource represents the vulnerability report for a specified
+   * Compute Engine virtual machine (VM) instance at a given point in time.
+   * For more information, see [Vulnerability
+   * reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1alpha.VulnerabilityReport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1alpha.VulnerabilityReport) + com.google.cloud.osconfig.v1alpha.VulnerabilityReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.class, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1alpha.VulnerabilityReport.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVulnerabilitiesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (vulnerabilitiesBuilder_ == null) { + vulnerabilities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + vulnerabilitiesBuilder_.clear(); + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityProto + .internal_static_google_cloud_osconfig_v1alpha_VulnerabilityReport_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1alpha.VulnerabilityReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport build() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport buildPartial() { + com.google.cloud.osconfig.v1alpha.VulnerabilityReport result = + new com.google.cloud.osconfig.v1alpha.VulnerabilityReport(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (vulnerabilitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vulnerabilities_ = java.util.Collections.unmodifiableList(vulnerabilities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vulnerabilities_ = vulnerabilities_; + } else { + result.vulnerabilities_ = vulnerabilitiesBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.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.v1alpha.VulnerabilityReport) { + return mergeFrom((com.google.cloud.osconfig.v1alpha.VulnerabilityReport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1alpha.VulnerabilityReport other) { + if (other == com.google.cloud.osconfig.v1alpha.VulnerabilityReport.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (vulnerabilitiesBuilder_ == null) { + if (!other.vulnerabilities_.isEmpty()) { + if (vulnerabilities_.isEmpty()) { + vulnerabilities_ = other.vulnerabilities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.addAll(other.vulnerabilities_); + } + onChanged(); + } + } else { + if (!other.vulnerabilities_.isEmpty()) { + if (vulnerabilitiesBuilder_.isEmpty()) { + vulnerabilitiesBuilder_.dispose(); + vulnerabilitiesBuilder_ = null; + vulnerabilities_ = other.vulnerabilities_; + bitField0_ = (bitField0_ & ~0x00000001); + vulnerabilitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVulnerabilitiesFieldBuilder() + : null; + } else { + vulnerabilitiesBuilder_.addAllMessages(other.vulnerabilities_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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.v1alpha.VulnerabilityReport parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1alpha.VulnerabilityReport) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The `vulnerabilityReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The `vulnerabilityReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The `vulnerabilityReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The `vulnerabilityReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The `vulnerabilityReport` API resource name.
+     * Format:
+     * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List + vulnerabilities_ = java.util.Collections.emptyList(); + + private void ensureVulnerabilitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vulnerabilities_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability>( + vulnerabilities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder> + vulnerabilitiesBuilder_; + + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getVulnerabilitiesList() { + if (vulnerabilitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vulnerabilities_); + } else { + return vulnerabilitiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getVulnerabilitiesCount() { + if (vulnerabilitiesBuilder_ == null) { + return vulnerabilities_.size(); + } else { + return vulnerabilitiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability getVulnerabilities( + int index) { + if (vulnerabilitiesBuilder_ == null) { + return vulnerabilities_.get(index); + } else { + return vulnerabilitiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVulnerabilities( + int index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability value) { + if (vulnerabilitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.set(index, value); + onChanged(); + } else { + vulnerabilitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVulnerabilities( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder + builderForValue) { + if (vulnerabilitiesBuilder_ == null) { + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.set(index, builderForValue.build()); + onChanged(); + } else { + vulnerabilitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addVulnerabilities( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability value) { + if (vulnerabilitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.add(value); + onChanged(); + } else { + vulnerabilitiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addVulnerabilities( + int index, com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability value) { + if (vulnerabilitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.add(index, value); + onChanged(); + } else { + vulnerabilitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addVulnerabilities( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder + builderForValue) { + if (vulnerabilitiesBuilder_ == null) { + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.add(builderForValue.build()); + onChanged(); + } else { + vulnerabilitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addVulnerabilities( + int index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder + builderForValue) { + if (vulnerabilitiesBuilder_ == null) { + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.add(index, builderForValue.build()); + onChanged(); + } else { + vulnerabilitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllVulnerabilities( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability> + values) { + if (vulnerabilitiesBuilder_ == null) { + ensureVulnerabilitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vulnerabilities_); + onChanged(); + } else { + vulnerabilitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearVulnerabilities() { + if (vulnerabilitiesBuilder_ == null) { + vulnerabilities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + vulnerabilitiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeVulnerabilities(int index) { + if (vulnerabilitiesBuilder_ == null) { + ensureVulnerabilitiesIsMutable(); + vulnerabilities_.remove(index); + onChanged(); + } else { + vulnerabilitiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder + getVulnerabilitiesBuilder(int index) { + return getVulnerabilitiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder + getVulnerabilitiesOrBuilder(int index) { + if (vulnerabilitiesBuilder_ == null) { + return vulnerabilities_.get(index); + } else { + return vulnerabilitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder> + getVulnerabilitiesOrBuilderList() { + if (vulnerabilitiesBuilder_ != null) { + return vulnerabilitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vulnerabilities_); + } + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder + addVulnerabilitiesBuilder() { + return getVulnerabilitiesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder + addVulnerabilitiesBuilder(int index) { + return getVulnerabilitiesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. List of vulnerabilities affecting the VM.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder> + getVulnerabilitiesBuilderList() { + return getVulnerabilitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder> + getVulnerabilitiesFieldBuilder() { + if (vulnerabilitiesBuilder_ == null) { + vulnerabilitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability.Builder, + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder>( + vulnerabilities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + vulnerabilities_ = null; + } + return vulnerabilitiesBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp for when the last vulnerability report was
+     * generated for the VM.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_; + } + + @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.v1alpha.VulnerabilityReport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1alpha.VulnerabilityReport) + private static final com.google.cloud.osconfig.v1alpha.VulnerabilityReport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1alpha.VulnerabilityReport(); + } + + public static com.google.cloud.osconfig.v1alpha.VulnerabilityReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VulnerabilityReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VulnerabilityReport(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.v1alpha.VulnerabilityReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportName.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportName.java new file mode 100644 index 00000000..d98229ae --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportName.java @@ -0,0 +1,225 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class VulnerabilityReportName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected VulnerabilityReportName() { + project = null; + location = null; + instance = null; + } + + private VulnerabilityReportName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static VulnerabilityReportName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static VulnerabilityReportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "VulnerabilityReportName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (VulnerabilityReportName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + VulnerabilityReportName that = ((VulnerabilityReportName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** + * Builder for projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport. + */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(VulnerabilityReportName vulnerabilityReportName) { + project = vulnerabilityReportName.project; + location = vulnerabilityReportName.location; + instance = vulnerabilityReportName.instance; + } + + public VulnerabilityReportName build() { + return new VulnerabilityReportName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java new file mode 100644 index 00000000..931bf526 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/java/com/google/cloud/osconfig/v1alpha/VulnerabilityReportOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1alpha/vulnerability.proto + +package com.google.cloud.osconfig.v1alpha; + +public interface VulnerabilityReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1alpha.VulnerabilityReport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The `vulnerabilityReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The `vulnerabilityReport` API resource name.
+   * Format:
+   * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getVulnerabilitiesList(); + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability getVulnerabilities(int index); + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getVulnerabilitiesCount(); + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder> + getVulnerabilitiesOrBuilderList(); + /** + * + * + *
+   * Output only. List of vulnerabilities affecting the VM.
+   * 
+ * + * + * repeated .google.cloud.osconfig.v1alpha.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.osconfig.v1alpha.VulnerabilityReport.VulnerabilityOrBuilder + getVulnerabilitiesOrBuilder(int index); + + /** + * + * + *
+   * Output only. The timestamp for when the last vulnerability report was
+   * generated for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp for when the last vulnerability report was
+   * generated for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The timestamp for when the last vulnerability report was
+   * generated for the VM.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto new file mode 100644 index 00000000..fa60feaf --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/config_common.proto @@ -0,0 +1,120 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "ConfigCommonProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// Step performed by the OS Config agent for configuring an `OSPolicyResource` +// to its desired state. +message OSPolicyResourceConfigStep { + // Supported configuration step types + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Validation to detect resource conflicts, schema errors, etc. + VALIDATION = 1; + + // Check the current desired state status of the resource. + DESIRED_STATE_CHECK = 2; + + // Enforce the desired state for a resource that is not in desired state. + DESIRED_STATE_ENFORCEMENT = 3; + + // Re-check desired state status for a resource after enforcement of all + // resources in the current configuration run. + // + // This step is used to determine the final desired state status for the + // resource. It accounts for any resources that might have drifted from + // their desired state due to side effects from configuring other resources + // during the current configuration run. + DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + } + + // Supported outcomes for a configuration step. + enum Outcome { + // Default value. This value is unused. + OUTCOME_UNSPECIFIED = 0; + + // The step succeeded. + SUCCEEDED = 1; + + // The step failed. + FAILED = 2; + } + + // Configuration step type. + Type type = 1; + + // Outcome of the configuration step. + Outcome outcome = 2; + + // An error message recorded during the execution of this step. + // Only populated when outcome is FAILED. + string error_message = 3; +} + +// Compliance data for an OS policy resource. +message OSPolicyResourceCompliance { + // ExecResource specific output. + message ExecResourceOutput { + // Output from Enforcement phase output file (if run). + // Output size is limited to 100K bytes. + bytes enforcement_output = 2; + } + + // The id of the OS policy resource. + string os_policy_resource_id = 1; + + // Ordered list of configuration steps taken by the agent for the OS policy + // resource. + repeated OSPolicyResourceConfigStep config_steps = 2; + + // Compliance state of the OS policy resource. + OSPolicyComplianceState state = 3; + + // Resource specific output. + oneof output { + // ExecResource specific output. + ExecResourceOutput exec_resource_output = 4; + } +} + +// Supported OSPolicy compliance states. +enum OSPolicyComplianceState { + // Default value. This value is unused. + OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED = 0; + + // Compliant state. + COMPLIANT = 1; + + // Non-compliant state + NON_COMPLIANT = 2; + + // Unknown compliance state. + UNKNOWN = 3; + + // No applicable OS policies were found for the instance. + // This state is only applicable to the instance. + NO_OS_POLICIES_APPLICABLE = 4; +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto new file mode 100644 index 00000000..65c3f682 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto @@ -0,0 +1,173 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1alpha/config_common.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "InstanceOSPoliciesComplianceProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// This API resource represents the OS policies compliance data for a Compute +// Engine virtual machine (VM) instance at a given point in time. +// +// A Compute Engine VM can have multiple OS policy assignments, and each +// assignment can have multiple OS policies. As a result, multiple OS policies +// could be applied to a single VM. +// +// You can use this API resource to determine both the compliance state of your +// VM as well as the compliance state of an individual OS policy. +// +// For more information, see [View +// compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance). +message InstanceOSPoliciesCompliance { + option (google.api.resource) = { + type: "osconfig.googleapis.com/InstanceOSPoliciesCompliance" + pattern: "projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}" + }; + + // Compliance data for an OS policy + message OSPolicyCompliance { + // The OS policy id + string os_policy_id = 1; + + // Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + // belongs to. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 2 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // Compliance state of the OS policy. + OSPolicyComplianceState state = 4; + + // Compliance data for each `OSPolicyResource` that is applied to the + // VM. + repeated OSPolicyResourceCompliance os_policy_resource_compliances = 5; + } + + // Output only. The `InstanceOSPoliciesCompliance` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Compute Engine VM instance name. + string instance = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Compliance state of the VM. + OSPolicyComplianceState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed compliance state of the VM. + // This field is populated only when compliance state is `UNKNOWN`. + // + // It may contain one of the following values: + // + // * `no-compliance-data`: Compliance data is not available for this VM. + // * `no-agent-detected`: OS Config agent is not detected for this VM. + // * `config-not-supported-by-agent`: The version of the OS Config agent + // running on this VM does not support configuration management. + // * `inactive`: VM is not running. + // * `internal-service-errors`: There were internal service errors encountered + // while enforcing compliance. + // * `agent-errors`: OS config agent encountered errors while enforcing + // compliance. + string detailed_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reason for the `detailed_state` of the VM (if any). + string detailed_state_reason = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Compliance data for each `OSPolicy` that is applied to the VM. + repeated OSPolicyCompliance os_policy_compliances = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last compliance check for the VM. + google.protobuf.Timestamp last_compliance_check_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier for the last compliance run. + // This id will be logged by the OS config agent during a compliance run and + // can be used for debugging and tracing purpose. + string last_compliance_run_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting OS policies compliance data for the given +// Compute Engine VM instance. +message GetInstanceOSPoliciesComplianceRequest { + // Required. API resource name for instance OS policies compliance resource. + // + // Format: + // `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` + // + // For `{project}`, either Compute Engine project-number or project-id can be + // provided. + // For `{instance}`, either Compute Engine VM instance-id or instance-name can + // be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/InstanceOSPoliciesCompliance" + } + ]; +} + +// A request message for listing OS policies compliance data for all Compute +// Engine VMs in the given location. +message ListInstanceOSPoliciesCompliancesRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}` + // + // For `{project}`, either Compute Engine project-number or project-id can be + // provided. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListInstanceOSPoliciesCompliances` that indicates where this listing + // should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by a + // `InstanceOSPoliciesCompliance` API resource to be included in the response. + string filter = 4; +} + +// A response message for listing OS policies compliance data for all Compute +// Engine VMs in the given location. +message ListInstanceOSPoliciesCompliancesResponse { + // List of instance OS policies compliance objects. + repeated InstanceOSPoliciesCompliance instance_os_policies_compliances = 1; + + // The pagination token to retrieve the next page of instance OS policies + // compliance objects. + string next_page_token = 2; +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto new file mode 100644 index 00000000..38e12f94 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/inventory.proto @@ -0,0 +1,359 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "Inventories"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// OS Inventory is a service for collecting and reporting operating +// system and package information on VM instances. + +// This API resource represents the available inventory data for a +// Compute Engine virtual machine (VM) instance at a given point in time. +// +// You can use this API resource to determine the inventory data of your VM. +// +// For more information, see [Information provided by OS inventory +// management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected). +message Inventory { + option (google.api.resource) = { + type: "osconfig.googleapis.com/Inventory" + pattern: "projects/{project}/locations/{location}/instances/{instance}/inventory" + }; + + // Operating system information for the VM. + message OsInfo { + // The VM hostname. + string hostname = 9; + + // The operating system long name. + // For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + // Datacenter'. + string long_name = 2; + + // The operating system short name. + // For example, 'windows' or 'debian'. + string short_name = 3; + + // The version of the operating system. + string version = 4; + + // The system architecture of the operating system. + string architecture = 5; + + // The kernel version of the operating system. + string kernel_version = 6; + + // The kernel release of the operating system. + string kernel_release = 7; + + // The current version of the OS Config agent running on the VM. + string osconfig_agent_version = 8; + } + + // A single piece of inventory on a VM. + message Item { + // The origin of a specific inventory item. + enum OriginType { + // Invalid. An origin type must be specified. + ORIGIN_TYPE_UNSPECIFIED = 0; + + // This inventory item was discovered as the result of the agent + // reporting inventory via the reporting API. + INVENTORY_REPORT = 1; + } + + // The different types of inventory that are tracked on a VM. + enum Type { + // Invalid. An type must be specified. + TYPE_UNSPECIFIED = 0; + + // This represents a package that is installed on the VM. + INSTALLED_PACKAGE = 1; + + // This represents an update that is available for a package. + AVAILABLE_PACKAGE = 2; + } + + // Identifier for this item, unique across items for this VM. + string id = 1; + + // The origin of this inventory item. + OriginType origin_type = 2; + + // When this inventory item was first detected. + google.protobuf.Timestamp create_time = 8; + + // When this inventory item was last modified. + google.protobuf.Timestamp update_time = 9; + + // The specific type of inventory, correlating to its specific details. + Type type = 5; + + // Specific details of this inventory item based on its type. + oneof details { + // Software package present on the VM instance. + SoftwarePackage installed_package = 6; + + // Software package available to be installed on the VM instance. + SoftwarePackage available_package = 7; + } + } + + // Software package information of the operating system. + message SoftwarePackage { + // Information about the different types of software packages. + oneof details { + // Yum package info. + // For details about the yum package manager, see + // https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + VersionedPackage yum_package = 1; + + // Details of an APT package. + // For details about the apt package manager, see + // https://wiki.debian.org/Apt. + VersionedPackage apt_package = 2; + + // Details of a Zypper package. + // For details about the Zypper package manager, see + // https://en.opensuse.org/SDB:Zypper_manual. + VersionedPackage zypper_package = 3; + + // Details of a Googet package. + // For details about the googet package manager, see + // https://github.com/google/googet. + VersionedPackage googet_package = 4; + + // Details of a Zypper patch. + // For details about the Zypper package manager, see + // https://en.opensuse.org/SDB:Zypper_manual. + ZypperPatch zypper_patch = 5; + + // Details of a Windows Update package. + // See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + // information about Windows Update. + WindowsUpdatePackage wua_package = 6; + + // Details of a Windows Quick Fix engineering package. + // See + // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + // for info in Windows Quick Fix Engineering. + WindowsQuickFixEngineeringPackage qfe_package = 7; + + // Details of a COS package. + VersionedPackage cos_package = 8; + } + } + + // Information related to the a standard versioned package. This includes + // package info for APT, Yum, Zypper, and Googet package managers. + message VersionedPackage { + // The name of the package. + string package_name = 4; + + // The system architecture this package is intended for. + string architecture = 2; + + // The version of the package. + string version = 3; + } + + // Details related to a Zypper Patch. + message ZypperPatch { + // The name of the patch. + string patch_name = 5; + + // The category of the patch. + string category = 2; + + // The severity specified for this patch + string severity = 3; + + // Any summary information provided about this patch. + string summary = 4; + } + + // Details related to a Windows Update package. + // Field data and names are taken from Windows Update API IUpdate Interface: + // https://docs.microsoft.com/en-us/windows/win32/api/_wua/ + // Descriptive fields like title, and description are localized based on + // the locale of the VM being updated. + message WindowsUpdatePackage { + // Categories specified by the Windows Update. + message WindowsUpdateCategory { + // The identifier of the windows update category. + string id = 1; + + // The name of the windows update category. + string name = 2; + } + + // The localized title of the update package. + string title = 1; + + // The localized description of the update package. + string description = 2; + + // The categories that are associated with this update package. + repeated WindowsUpdateCategory categories = 3; + + // A collection of Microsoft Knowledge Base article IDs that are associated + // with the update package. + repeated string kb_article_ids = 4; + + // A hyperlink to the language-specific support information for the update. + string support_url = 11; + + // A collection of URLs that provide more information about the update + // package. + repeated string more_info_urls = 5; + + // Gets the identifier of an update package. Stays the same across + // revisions. + string update_id = 6; + + // The revision number of this update package. + int32 revision_number = 7; + + // The last published date of the update, in (UTC) date and time. + google.protobuf.Timestamp last_deployment_change_time = 10; + } + + // Information related to a Quick Fix Engineering package. + // Fields are taken from Windows QuickFixEngineering Interface and match + // the source names: + // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + message WindowsQuickFixEngineeringPackage { + // A short textual description of the QFE update. + string caption = 1; + + // A textual description of the QFE update. + string description = 2; + + // Unique identifier associated with a particular QFE update. + string hot_fix_id = 3; + + // Date that the QFE update was installed. Mapped from installed_on field. + google.protobuf.Timestamp install_time = 5; + } + + // Output only. The `Inventory` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Base level operating system information for the VM. + OsInfo os_info = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Inventory items related to the VM keyed by an opaque unique identifier for + // each inventory item. The identifier is unique to each distinct and + // addressable inventory item and will change, when there is a new package + // version. + map items = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last reported inventory for the VM. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting inventory data for the specified VM. +message GetInventoryRequest { + // Required. API resource name for inventory resource. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/inventory` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/Inventory" + } + ]; + + // Inventory view indicating what information should be included in the + // inventory resource. If unspecified, the default view is BASIC. + InventoryView view = 2; +} + +// A request message for listing inventory data for all VMs in the specified +// location. +message ListInventoriesRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}/instances/{instance}` + // + // For `{project}`, either `project-number` or `project-id` can be + // provided. For `{instance}`, only hyphen or dash character is supported to + // list inventories across VMs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + } + ]; + + // Inventory view indicating what information should be included in the + // inventory resource. If unspecified, the default view is BASIC. + InventoryView view = 2; + + // The maximum number of results to return. + int32 page_size = 3; + + // A pagination token returned from a previous call to + // `ListInventories` that indicates where this listing + // should continue from. + string page_token = 4; + + // If provided, this field specifies the criteria that must be met by a + // `Inventory` API resource to be included in the response. + string filter = 5; +} + +// A response message for listing inventory data for all VMs in a specified +// location. +message ListInventoriesResponse { + // List of inventory objects. + repeated Inventory inventories = 1; + + // The pagination token to retrieve the next page of inventory objects. + string next_page_token = 2; +} + +// The view for inventory objects. +enum InventoryView { + // The default value. + // The API defaults to the BASIC view. + INVENTORY_VIEW_UNSPECIFIED = 0; + + // Returns the basic inventory information that includes `os_info`. + BASIC = 1; + + // Returns all fields. + FULL = 2; +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto new file mode 100644 index 00000000..5b004145 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy.proto @@ -0,0 +1,535 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OSPolicyProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// An OS policy defines the desired state configuration for a VM. +message OSPolicy { + // The `OSFilter` is used to specify the OS filtering criteria for the + // resource group. + message OSFilter { + // This should match OS short name emitted by the OS inventory agent. + // An empty value matches any OS. + string os_short_name = 1; + + // This value should match the version emitted by the OS inventory + // agent. + // Prefix matches are supported if asterisk(*) is provided as the + // last character. For example, to match all versions with a major + // version of `7`, specify the following value for this field `7.*` + string os_version = 2; + } + + // An OS policy resource is used to define the desired state configuration + // and provides a specific functionality like installing/removing packages, + // executing a script etc. + // + // The system ensures that resources are always in their desired state by + // taking necessary actions if they have drifted from their desired state. + message Resource { + // A remote or local file. + message File { + // Specifies a file available via some URI. + message Remote { + // Required. URI from which to fetch the object. It should contain both the + // protocol and path following the format `{protocol}://{location}`. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // SHA256 checksum of the remote file. + string sha256_checksum = 2; + } + + // Specifies a file available as a Cloud Storage Object. + message Gcs { + // Required. Bucket of the Cloud Storage object. + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the Cloud Storage object. + string object = 2 [(google.api.field_behavior) = REQUIRED]; + + // Generation number of the Cloud Storage object. + int64 generation = 3; + } + + // A specific type of file. + oneof type { + // A generic remote file. + Remote remote = 1; + + // A Cloud Storage object. + Gcs gcs = 2; + + // A local path within the VM to use. + string local_path = 3; + } + + // Defaults to false. When false, files are subject to validations + // based on the file type: + // + // Remote: A checksum must be specified. + // Cloud Storage: An object generation number must be specified. + bool allow_insecure = 4; + } + + // A resource that manages a system package. + message PackageResource { + // A deb package file. dpkg packages only support INSTALLED state. + message Deb { + // Required. A deb package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether dependencies should also be installed. + // - install when false: `dpkg -i package` + // - install when true: `apt-get update && apt-get -y install + // package.deb` + bool pull_deps = 2; + } + + // A package managed by APT. + // - install: `apt-get update && apt-get -y install [name]` + // - remove: `apt-get -y remove [name]` + message APT { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // An RPM package file. RPM packages only support INSTALLED state. + message RPM { + // Required. An rpm package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Whether dependencies should also be installed. + // - install when false: `rpm --upgrade --replacepkgs package.rpm` + // - install when true: `yum -y install package.rpm` or + // `zypper -y install package.rpm` + bool pull_deps = 2; + } + + // A package managed by YUM. + // - install: `yum -y install package` + // - remove: `yum -y remove package` + message YUM { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A package managed by Zypper. + // - install: `zypper -y install package` + // - remove: `zypper -y rm package` + message Zypper { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A package managed by GooGet. + // - install: `googet -noconfirm install package` + // - remove: `googet -noconfirm remove package` + message GooGet { + // Required. Package name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // An MSI package. MSI packages only support INSTALLED state. + message MSI { + // Required. The MSI package. + File source = 1 [(google.api.field_behavior) = REQUIRED]; + + // Additional properties to use during installation. + // This should be in the format of Property=Setting. + // Appended to the defaults of `ACTION=INSTALL + // REBOOT=ReallySuppress`. + repeated string properties = 2; + } + + // The desired state that the OS Config agent maintains on the VM. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is not installed and + // uninstalls it if detected. + REMOVED = 2; + } + + // Required. The desired state the agent should maintain for this package. + DesiredState desired_state = 1 [(google.api.field_behavior) = REQUIRED]; + + // A system package. + oneof system_package { + // A package managed by Apt. + APT apt = 2; + + // A deb package file. + Deb deb = 3; + + // A package managed by YUM. + YUM yum = 4; + + // A package managed by Zypper. + Zypper zypper = 5; + + // An rpm package file. + RPM rpm = 6; + + // A package managed by GooGet. + GooGet googet = 7; + + // An MSI package. + MSI msi = 8; + } + } + + // A resource that manages a package repository. + message RepositoryResource { + // Represents a single apt package repository. These will be added to + // a repo file that will be managed at + // `/etc/apt/sources.list.d/google_osconfig.list`. + message AptRepository { + // Type of archive. + enum ArchiveType { + // Unspecified is invalid. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // Deb indicates that the archive contains binary files. + DEB = 1; + + // Deb-src indicates that the archive contains source files. + DEB_SRC = 2; + } + + // Required. Type of archive files in this repository. + ArchiveType archive_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. URI for this repository. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distribution of this repository. + string distribution = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of components for this repository. Must contain at least one + // item. + repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; + + // URI of the key file for this repository. The agent maintains a + // keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + string gpg_key = 5; + } + + // Represents a single yum package repository. These are added to a + // repo file that is managed at + // `/etc/yum.repos.d/google_osconfig.repo`. + message YumRepository { + // Required. A one word, unique name for this repository. This is the `repo + // id` in the yum config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique + // identifier when checking for resource conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; + } + + // Represents a single zypper package repository. These are added to a + // repo file that is managed at + // `/etc/zypp/repos.d/google_osconfig.repo`. + message ZypperRepository { + // Required. A one word, unique name for this repository. This is the `repo + // id` in the zypper config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique + // identifier when checking for GuestPolicy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; + } + + // Represents a Goo package repository. These are added to a repo file + // that is managed at + // `C:/ProgramData/GooGet/repos/google_osconfig.repo`. + message GooRepository { + // Required. The name of the repository. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The url of the repository. + string url = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A specific type of repository. + oneof repository { + // An Apt Repository. + AptRepository apt = 1; + + // A Yum Repository. + YumRepository yum = 2; + + // A Zypper Repository. + ZypperRepository zypper = 3; + + // A Goo Repository. + GooRepository goo = 4; + } + } + + // A resource that allows executing scripts on the VM. + // + // The `ExecResource` has 2 stages: `validate` and `enforce` and both stages + // accept a script as an argument to execute. + // + // When the `ExecResource` is applied by the agent, it first executes the + // script in the `validate` stage. The `validate` stage can signal that the + // `ExecResource` is already in the desired state by returning an exit code + // of `100`. If the `ExecResource` is not in the desired state, it should + // return an exit code of `101`. Any other exit code returned by this stage + // is considered an error. + // + // If the `ExecResource` is not in the desired state based on the exit code + // from the `validate` stage, the agent proceeds to execute the script from + // the `enforce` stage. If the `ExecResource` is already in the desired + // state, the `enforce` stage will not be run. + // Similar to `validate` stage, the `enforce` stage should return an exit + // code of `100` to indicate that the resource in now in its desired state. + // Any other exit code is considered an error. + // + // NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to + // have an explicit indicator of `in desired state`, `not in desired state` + // and errors. Because, for example, Powershell will always return an exit + // code of `0` unless an `exit` statement is provided in the script. So, for + // reasons of consistency and being explicit, exit codes `100` and `101` + // were chosen. + message ExecResource { + // A file or script to execute. + message Exec { + // The interpreter to use. + enum Interpreter { + // Defaults to NONE. + INTERPRETER_UNSPECIFIED = 0; + + // If no interpreter is specified the + // source will be executed directly, which will likely only + // succeed for executables and scripts with shebang lines. + // [Wikipedia + // shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). + NONE = 1; + + // Indicates that the script will be run with /bin/sh on Linux and + // cmd.exe on windows. + SHELL = 2; + + // Indicates that the script will be run with powershell. + POWERSHELL = 3; + } + + // What to execute. + oneof source { + // A remote or local file. + File file = 1; + + // An inline script. + // The size of the script is limited to 1024 characters. + string script = 2; + } + + // Optional arguments to pass to the source during execution. + repeated string args = 3; + + // Required. The script interpreter to use. + Interpreter interpreter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Only recorded for enforce Exec. + // Path to an output file (that is created by this Exec) whose + // content will be recorded in OSPolicyResourceCompliance after a + // successful run. Absence or failure to read this file will result in + // this ExecResource being non-compliant. Output file size is limited to + // 100K bytes. + string output_file_path = 5; + } + + // Required. What to run to validate this resource is in the desired state. + // An exit code of 100 indicates "in desired state", and exit code of 101 + // indicates "not in desired state". Any other exit code indicates a + // failure running validate. + Exec validate = 1 [(google.api.field_behavior) = REQUIRED]; + + // What to run to bring this resource into the desired state. + // An exit code of 100 indicates "success", any other exit code indicates + // a failure running enforce. + Exec enforce = 2; + } + + // A resource that manages the state of a file. + message FileResource { + // Desired state of the file. + enum DesiredState { + // Unspecified is invalid. + DESIRED_STATE_UNSPECIFIED = 0; + + // Ensure file at path is present. + PRESENT = 1; + + // Ensure file at path is absent. + ABSENT = 2; + + // Ensure the contents of the file at path matches. If the file does + // not exist it will be created. + CONTENTS_MATCH = 3; + } + + // The source for the contents of the file. + oneof source { + // A remote or local source. + File file = 1; + + // A a file with this content. + // The size of the content is limited to 1024 characters. + string content = 2; + } + + // Required. The absolute path of the file within the VM. + string path = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Desired state of the file. + DesiredState state = 4 [(google.api.field_behavior) = REQUIRED]; + + // Consists of three octal digits which represent, in + // order, the permissions of the owner, group, and other users for the + // file (similarly to the numeric mode used in the linux chmod + // utility). Each digit represents a three bit number with the 4 bit + // corresponding to the read permissions, the 2 bit corresponds to the + // write bit, and the one bit corresponds to the execute permission. + // Default behavior is 755. + // + // Below are some examples of permissions and their associated values: + // read, write, and execute: 7 + // read and execute: 5 + // read and write: 6 + // read only: 4 + string permissions = 5; + } + + // Required. The id of the resource with the following restrictions: + // + // * 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 OS policy. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Resource type. + oneof resource_type { + // Package resource + PackageResource pkg = 2; + + // Package repository resource + RepositoryResource repository = 3; + + // Exec resource + ExecResource exec = 4; + + // File resource + FileResource file = 5; + } + } + + // Resource groups provide a mechanism to group OS policy resources. + // + // Resource groups enable OS policy authors to create a single OS policy + // to be applied to VMs running different operating Systems. + // + // When the OS policy is applied to a target VM, the appropriate resource + // group within the OS policy is selected based on the `OSFilter` specified + // within the resource group. + message ResourceGroup { + // Used to specify the OS filter for a resource group + OSFilter os_filter = 1; + + // Required. List of resources configured for this resource group. + // The resources are executed in the exact order specified here. + repeated Resource resources = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Policy mode + enum Mode { + // Invalid mode + MODE_UNSPECIFIED = 0; + + // This mode checks if the configuration resources in the policy are in + // their desired state. No actions are performed if they are not in the + // desired state. This mode is used for reporting purposes. + VALIDATION = 1; + + // This mode checks if the configuration resources in the policy are in + // their desired state, and if not, enforces the desired state. + ENFORCEMENT = 2; + } + + // Required. The id of the OS policy with the following restrictions: + // + // * 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 assignment. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Policy description. + // Length of the description is limited to 1024 characters. + string description = 2; + + // Required. Policy mode + Mode mode = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of resource groups for the policy. + // For a particular VM, resource groups are evaluated in the order specified + // and the first resource group that is applicable is selected and the rest + // are ignored. + // + // If none of the resource groups are applicable for a VM, the VM is + // considered to be non-compliant w.r.t this policy. This behavior can be + // toggled by the flag `allow_no_resource_group_match` + repeated ResourceGroup resource_groups = 4 [(google.api.field_behavior) = REQUIRED]; + + // This flag determines the OS policy compliance status when none of the + // resource groups within the policy are applicable for a VM. Set this value + // to `true` if the policy needs to be reported as compliant even if the + // policy has nothing to validate or enforce. + bool allow_no_resource_group_match = 5; +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto new file mode 100644 index 00000000..4b9943aa --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/os_policy_assignments.proto @@ -0,0 +1,358 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1alpha/os_policy.proto"; +import "google/cloud/osconfig/v1alpha/osconfig_common.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OSPolicyAssignments"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// OS policy assignment is an API resource that is used to +// apply a set of OS policies to a dynamically targeted group of Compute Engine +// VM instances. +// +// An OS policy is used to define the desired state configuration for a +// Compute Engine VM instance through a set of configuration resources that +// provide capabilities such as installing or removing software packages, or +// executing a script. +// +// For more information, see [OS policy and OS policy +// assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). +message OSPolicyAssignment { + option (google.api.resource) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + pattern: "projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}" + }; + + // Message representing label set. + // * A label is a key value pair set for a VM. + // * A LabelSet is a set of labels. + // * Labels within a LabelSet are ANDed. In other words, a LabelSet is + // applicable for a VM only if it matches all the labels in the + // LabelSet. + // * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will + // only be applicable for those VMs with both labels + // present. + message LabelSet { + // Labels are identified by key/value pairs in this map. + // A VM should contain all the key/value pairs specified in this + // map to be selected. + map labels = 1; + } + + // Message to represent the filters to select VMs for an assignment + message InstanceFilter { + // Target all VMs in the project. If true, no other criteria is + // permitted. + bool all = 1; + + // A VM is included if it's OS short name matches with any of the + // values provided in this list. + repeated string os_short_names = 2; + + // List of label sets used for VM inclusion. + // + // If the list has more than one `LabelSet`, the VM is included if any + // of the label sets are applicable for the VM. + repeated LabelSet inclusion_labels = 3; + + // List of label sets used for VM exclusion. + // + // If the list has more than one label set, the VM is excluded if any + // of the label sets are applicable for the VM. + // + // This filter is applied last in the filtering chain and therefore a + // VM is guaranteed to be excluded if it satisfies one of the below + // label sets. + repeated LabelSet exclusion_labels = 4; + } + + // Message to configure the rollout at the zonal level for the OS policy + // assignment. + message Rollout { + // Required. The maximum number (or percentage) of VMs per zone to disrupt at + // any given moment. + FixedOrPercent disruption_budget = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. This determines the minimum duration of time to wait after the + // configuration changes are applied through the current rollout. A + // VM continues to count towards the `disruption_budget` at least + // until this duration of time has passed after configuration changes are + // applied. + google.protobuf.Duration min_wait_duration = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // OS policy assignment rollout state + enum RolloutState { + // Invalid value + ROLLOUT_STATE_UNSPECIFIED = 0; + + // The rollout is in progress. + IN_PROGRESS = 1; + + // The rollout is being cancelled. + CANCELLING = 2; + + // The rollout is cancelled. + CANCELLED = 3; + + // The rollout has completed successfully. + SUCCEEDED = 4; + } + + // Resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + // + // This field is ignored when you create an OS policy assignment. + string name = 1; + + // OS policy assignment description. + // Length of the description is limited to 1024 characters. + string description = 2; + + // Required. List of OS policies to be applied to the VMs. + repeated OSPolicy os_policies = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Filter to select VMs. + InstanceFilter instance_filter = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Rollout to deploy the OS policy assignment. + // A rollout is triggered in the following situations: + // 1) OSPolicyAssignment is created. + // 2) OSPolicyAssignment is updated and the update contains changes to one of + // the following fields: + // - instance_filter + // - os_policies + // 3) OSPolicyAssignment is deleted. + Rollout rollout = 5 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The assignment revision ID + // A new revision is committed whenever a rollout is triggered for a OS policy + // assignment + string revision_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. OS policy assignment rollout state + RolloutState rollout_state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that this revision has been successfully rolled out in this zone + // and new VMs will be assigned OS policies from this revision. + // + // For a given OS policy assignment, there is only one revision with a value + // of `true` for this field. + bool baseline = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that this revision deletes the OS policy assignment. + bool deleted = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates that reconciliation is in progress for the revision. + // This value is `true` when the `rollout_state` is one of: + // * IN_PROGRESS + // * CANCELLING + bool reconciling = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server generated unique id for the OS policy assignment resource. + string uid = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OS policy assignment operation metadata provided by OS policy assignment API +// methods that return long running operations. +message OSPolicyAssignmentOperationMetadata { + // The OS policy assignment API method. + enum APIMethod { + // Invalid value + API_METHOD_UNSPECIFIED = 0; + + // Create OS policy assignment API method + CREATE = 1; + + // Update OS policy assignment API method + UPDATE = 2; + + // Delete OS policy assignment API method + DELETE = 3; + } + + // State of the rollout + enum RolloutState { + // Invalid value + ROLLOUT_STATE_UNSPECIFIED = 0; + + // The rollout is in progress. + IN_PROGRESS = 1; + + // The rollout is being cancelled. + CANCELLING = 2; + + // The rollout is cancelled. + CANCELLED = 3; + + // The rollout has completed successfully. + SUCCEEDED = 4; + } + + // Reference to the `OSPolicyAssignment` API resource. + // + // Format: + // `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + string os_policy_assignment = 1 [(google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + }]; + + // The OS policy assignment API method. + APIMethod api_method = 2; + + // State of the rollout + RolloutState rollout_state = 3; + + // Rollout start time + google.protobuf.Timestamp rollout_start_time = 4; + + // Rollout update time + google.protobuf.Timestamp rollout_update_time = 5; +} + +// A request message to create an OS policy assignment +message CreateOSPolicyAssignmentRequest { + // Required. The parent resource name in the form: + // projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The OS policy assignment to be created. + OSPolicyAssignment os_policy_assignment = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The logical name of the OS policy assignment in the project + // with the following restrictions: + // + // * 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 os_policy_assignment_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message to update an OS policy assignment +message UpdateOSPolicyAssignmentRequest { + // Required. The updated OS policy assignment. + OSPolicyAssignment os_policy_assignment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Field mask that controls which fields of the assignment should be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message to get an OS policy assignment +message GetOSPolicyAssignmentRequest { + // Required. The resource name of OS policy assignment. + // + // Format: + // `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; +} + +// A request message to list OS policy assignments for a parent resource +message ListOSPolicyAssignmentsRequest { + // Required. The parent resource name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of assignments to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListOSPolicyAssignments` that indicates where this listing should continue + // from. + string page_token = 3; +} + +// A response message for listing all assignments under given parent. +message ListOSPolicyAssignmentsResponse { + // The list of assignments + repeated OSPolicyAssignment os_policy_assignments = 1; + + // The pagination token to retrieve the next page of OS policy assignments. + string next_page_token = 2; +} + +// A request message to list revisions for a OS policy assignment +message ListOSPolicyAssignmentRevisionsRequest { + // Required. The name of the OS policy assignment to list revisions for. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; + + // The maximum number of revisions to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListOSPolicyAssignmentRevisions` that indicates where this listing should + // continue from. + string page_token = 3; +} + +// A response message for listing all revisions for a OS policy assignment. +message ListOSPolicyAssignmentRevisionsResponse { + // The OS policy assignment revisions + repeated OSPolicyAssignment os_policy_assignments = 1; + + // The pagination token to retrieve the next page of OS policy assignment + // revisions. + string next_page_token = 2; +} + +// A request message for deleting a OS policy assignment. +message DeleteOSPolicyAssignmentRequest { + // Required. The name of the OS policy assignment to be deleted + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/OSPolicyAssignment" + } + ]; +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto new file mode 100644 index 00000000..9cd376c5 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_common.proto @@ -0,0 +1,39 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "Common"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// Message encapsulating a value that can be either absolute ("fixed") or +// relative ("percent") to a value. +message FixedOrPercent { + // Type of the value. + oneof mode { + // Specifies a fixed value. + int32 fixed = 1; + + // Specifies the relative value defined as a percentage, which will be + // multiplied by a reference value. + int32 percent = 2; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto new file mode 100644 index 00000000..8d979fd5 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/osconfig_zonal_service.proto @@ -0,0 +1,194 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto"; +import "google/cloud/osconfig/v1alpha/inventory.proto"; +import "google/cloud/osconfig/v1alpha/os_policy_assignments.proto"; +import "google/cloud/osconfig/v1alpha/vulnerability.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "OsConfigZonalServiceProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" +}; + +// Zonal OS Config API +// +// The OS Config service is the server-side component that allows users to +// manage package installations and patch jobs for Compute Engine VM instances. +service OsConfigZonalService { + option (google.api.default_host) = "osconfig.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create an OS policy assignment. + // + // This method also creates the first revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + rpc CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" + body: "os_policy_assignment" + }; + option (google.api.method_signature) = "parent,os_policy_assignment,os_policy_assignment_id"; + option (google.longrunning.operation_info) = { + response_type: "OSPolicyAssignment" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Update an existing OS policy assignment. + // + // This method creates a new revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + rpc UpdateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}" + body: "os_policy_assignment" + }; + option (google.api.method_signature) = "os_policy_assignment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "OSPolicyAssignment" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Retrieve an existing OS policy assignment. + // + // This method always returns the latest revision. In order to retrieve a + // previous revision of the assignment, also provide the revision ID in the + // `name` parameter. + rpc GetOSPolicyAssignment(GetOSPolicyAssignmentRequest) returns (OSPolicyAssignment) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List the OS policy assignments under the parent resource. + // + // For each OS policy assignment, the latest revision is returned. + rpc ListOSPolicyAssignments(ListOSPolicyAssignmentsRequest) returns (ListOSPolicyAssignmentsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/osPolicyAssignments" + }; + option (google.api.method_signature) = "parent"; + } + + // List the OS policy assignment revisions for a given OS policy assignment. + rpc ListOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest) returns (ListOSPolicyAssignmentRevisionsResponse) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions" + }; + option (google.api.method_signature) = "name"; + } + + // Delete the OS policy assignment. + // + // This method creates a new revision of the OS policy assignment. + // + // This method returns a long running operation (LRO) that contains the + // rollout details. The rollout can be cancelled by cancelling the LRO. + // + // If the LRO completes and is not cancelled, all revisions associated with + // the OS policy assignment are deleted. + // + // For more information, see [Method: + // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel). + rpc DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha/{name=projects/*/locations/*/osPolicyAssignments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OSPolicyAssignmentOperationMetadata" + }; + } + + // Get OS policies compliance data for the specified Compute Engine VM + // instance. + rpc GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest) returns (InstanceOSPoliciesCompliance) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instanceOSPoliciesCompliances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List OS policies compliance data for all Compute Engine VM instances in the + // specified zone. + rpc ListInstanceOSPoliciesCompliances(ListInstanceOSPoliciesCompliancesRequest) returns (ListInstanceOSPoliciesCompliancesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances" + }; + option (google.api.method_signature) = "parent"; + } + + // Get inventory data for the specified VM instance. If the VM has no + // associated inventory, the message `NOT_FOUND` is returned. + rpc GetInventory(GetInventoryRequest) returns (Inventory) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instances/*/inventory}" + }; + option (google.api.method_signature) = "name"; + } + + // List inventory data for all VM instances in the specified zone. + rpc ListInventories(ListInventoriesRequest) returns (ListInventoriesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/instances/*}/inventories" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the vulnerability report for the specified VM instance. Only VMs with + // inventory data have vulnerability reports associated with them. + rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) returns (VulnerabilityReport) { + option (google.api.http) = { + get: "/v1alpha/{name=projects/*/locations/*/instances/*/vulnerabilityReport}" + }; + option (google.api.method_signature) = "name"; + } + + // List vulnerability reports for all VM instances in the specified zone. + rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) returns (ListVulnerabilityReportsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports" + }; + option (google.api.method_signature) = "parent"; + } +} diff --git a/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto new file mode 100644 index 00000000..6b9a5eb1 --- /dev/null +++ b/proto-google-cloud-os-config-v1alpha/src/main/proto/google/cloud/osconfig/v1alpha/vulnerability.proto @@ -0,0 +1,337 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.osconfig.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.OsConfig.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1alpha;osconfig"; +option java_multiple_files = true; +option java_outer_classname = "VulnerabilityProto"; +option java_package = "com.google.cloud.osconfig.v1alpha"; +option php_namespace = "Google\\Cloud\\OsConfig\\V1alpha"; +option ruby_package = "Google::Cloud::OsConfig::V1alpha"; + +// This API resource represents the vulnerability report for a specified +// Compute Engine virtual machine (VM) instance at a given point in time. +// +// For more information, see [Vulnerability +// reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports). +message VulnerabilityReport { + option (google.api.resource) = { + type: "osconfig.googleapis.com/VulnerabilityReport" + pattern: "projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport" + }; + + // A vulnerability affecting the VM instance. + message Vulnerability { + // Contains metadata information for the vulnerability. This information is + // collected from the upstream feed of the operating system. + message Details { + // A reference for this vulnerability. + message Reference { + // The url of the reference. + string url = 1; + } + + // The CVE of the vulnerability. CVE cannot be + // empty and the combination of should be unique + // across vulnerabilities for a VM. + string cve = 1; + + // The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + // 0 - 10 where 0 indicates low severity and 10 indicates high severity. + float cvss_v2_score = 2; + + // The full description of the CVSSv3 for this vulnerability from NVD. + CVSSv3 cvss_v3 = 3; + + // Assigned severity/impact ranking from the distro. + string severity = 4; + + // The note or description describing the vulnerability from the distro. + string description = 5; + + // Corresponds to the references attached to the `VulnerabilityDetails`. + repeated Reference references = 6; + } + + // Contains metadata as per the upstream feed of the operating system and + // NVD. + Details details = 1; + + // Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + // This field displays the inventory items affected by this vulnerability. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. For some distros, + // this field may be empty. + repeated string installed_inventory_item_ids = 2; + + // Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + // If the vulnerability report was not updated after the VM inventory + // update, these values might not display in VM inventory. If there is no + // available fix, the field is empty. The `inventory_item` value specifies + // the latest `SoftwarePackage` available to the VM that fixes the + // vulnerability. + repeated string available_inventory_item_ids = 3; + + // The timestamp for when the vulnerability was first detected. + google.protobuf.Timestamp create_time = 4; + + // The timestamp for when the vulnerability was last modified. + google.protobuf.Timestamp update_time = 5; + } + + // Output only. The `vulnerabilityReport` API resource name. + // + // Format: + // `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of vulnerabilities affecting the VM. + repeated Vulnerability vulnerabilities = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp for when the last vulnerability report was + // generated for the VM. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A request message for getting the vulnerability report for the specified VM. +message GetVulnerabilityReportRequest { + // Required. API resource name for vulnerability resource. + // + // Format: + // `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, either Compute Engine `instance-id` or `instance-name` + // can be provided. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/VulnerabilityReport" + } + ]; +} + +// A request message for listing vulnerability reports for all VM instances in +// the specified location. +message ListVulnerabilityReportsRequest { + // Required. The parent resource name. + // + // Format: `projects/{project}/locations/{location}/instances/{instance}` + // + // For `{project}`, either `project-number` or `project-id` can be provided. + // For `{instance}`, only `-` character is supported to list vulnerability + // reports across VMs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + } + ]; + + // The maximum number of results to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to + // `ListVulnerabilityReports` that indicates where this listing + // should continue from. + string page_token = 3; + + // If provided, this field specifies the criteria that must be met by a + // `vulnerabilityReport` API resource to be included in the response. + string filter = 4; +} + +// A response message for listing vulnerability reports for all VM instances in +// the specified location. +message ListVulnerabilityReportsResponse { + // List of vulnerabilityReport objects. + repeated VulnerabilityReport vulnerability_reports = 1; + + // The pagination token to retrieve the next page of vulnerabilityReports + // object. + string next_page_token = 2; +} + +// Common Vulnerability Scoring System version 3. +// For details, see https://www.first.org/cvss/specification-document +message CVSSv3 { + // This metric reflects the context by which vulnerability exploitation is + // possible. + enum AttackVector { + // Invalid value. + ATTACK_VECTOR_UNSPECIFIED = 0; + + // The vulnerable component is bound to the network stack and the set of + // possible attackers extends beyond the other options listed below, up to + // and including the entire Internet. + ATTACK_VECTOR_NETWORK = 1; + + // The vulnerable component is bound to the network stack, but the attack is + // limited at the protocol level to a logically adjacent topology. + ATTACK_VECTOR_ADJACENT = 2; + + // The vulnerable component is not bound to the network stack and the + // attacker's path is via read/write/execute capabilities. + ATTACK_VECTOR_LOCAL = 3; + + // The attack requires the attacker to physically touch or manipulate the + // vulnerable component. + ATTACK_VECTOR_PHYSICAL = 4; + } + + // This metric describes the conditions beyond the attacker's control that + // must exist in order to exploit the vulnerability. + enum AttackComplexity { + // Invalid value. + ATTACK_COMPLEXITY_UNSPECIFIED = 0; + + // Specialized access conditions or extenuating circumstances do not exist. + // An attacker can expect repeatable success when attacking the vulnerable + // component. + ATTACK_COMPLEXITY_LOW = 1; + + // A successful attack depends on conditions beyond the attacker's control. + // That is, a successful attack cannot be accomplished at will, but requires + // the attacker to invest in some measurable amount of effort in preparation + // or execution against the vulnerable component before a successful attack + // can be expected. + ATTACK_COMPLEXITY_HIGH = 2; + } + + // This metric describes the level of privileges an attacker must possess + // before successfully exploiting the vulnerability. + enum PrivilegesRequired { + // Invalid value. + PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + + // The attacker is unauthorized prior to attack, and therefore does not + // require any access to settings or files of the vulnerable system to + // carry out an attack. + PRIVILEGES_REQUIRED_NONE = 1; + + // The attacker requires privileges that provide basic user capabilities + // that could normally affect only settings and files owned by a user. + // Alternatively, an attacker with Low privileges has the ability to access + // only non-sensitive resources. + PRIVILEGES_REQUIRED_LOW = 2; + + // The attacker requires privileges that provide significant (e.g., + // administrative) control over the vulnerable component allowing access to + // component-wide settings and files. + PRIVILEGES_REQUIRED_HIGH = 3; + } + + // This metric captures the requirement for a human user, other than the + // attacker, to participate in the successful compromise of the vulnerable + // component. + enum UserInteraction { + // Invalid value. + USER_INTERACTION_UNSPECIFIED = 0; + + // The vulnerable system can be exploited without interaction from any user. + USER_INTERACTION_NONE = 1; + + // Successful exploitation of this vulnerability requires a user to take + // some action before the vulnerability can be exploited. + USER_INTERACTION_REQUIRED = 2; + } + + // The Scope metric captures whether a vulnerability in one vulnerable + // component impacts resources in components beyond its security scope. + enum Scope { + // Invalid value. + SCOPE_UNSPECIFIED = 0; + + // An exploited vulnerability can only affect resources managed by the same + // security authority. + SCOPE_UNCHANGED = 1; + + // An exploited vulnerability can affect resources beyond the security scope + // managed by the security authority of the vulnerable component. + SCOPE_CHANGED = 2; + } + + // The Impact metrics capture the effects of a successfully exploited + // vulnerability on the component that suffers the worst outcome that is most + // directly and predictably associated with the attack. + enum Impact { + // Invalid value. + IMPACT_UNSPECIFIED = 0; + + // High impact. + IMPACT_HIGH = 1; + + // Low impact. + IMPACT_LOW = 2; + + // No impact. + IMPACT_NONE = 3; + } + + // The base score is a function of the base metric scores. + // https://www.first.org/cvss/specification-document#Base-Metrics + float base_score = 1; + + // The Exploitability sub-score equation is derived from the Base + // Exploitability metrics. + // https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + float exploitability_score = 2; + + // The Impact sub-score equation is derived from the Base Impact metrics. + float impact_score = 3; + + // This metric reflects the context by which vulnerability exploitation is + // possible. + AttackVector attack_vector = 5; + + // This metric describes the conditions beyond the attacker's control that + // must exist in order to exploit the vulnerability. + AttackComplexity attack_complexity = 6; + + // This metric describes the level of privileges an attacker must possess + // before successfully exploiting the vulnerability. + PrivilegesRequired privileges_required = 7; + + // This metric captures the requirement for a human user, other than the + // attacker, to participate in the successful compromise of the vulnerable + // component. + UserInteraction user_interaction = 8; + + // The Scope metric captures whether a vulnerability in one vulnerable + // component impacts resources in components beyond its security scope. + Scope scope = 9; + + // This metric measures the impact to the confidentiality of the information + // resources managed by a software component due to a successfully exploited + // vulnerability. + Impact confidentiality_impact = 10; + + // This metric measures the impact to integrity of a successfully exploited + // vulnerability. + Impact integrity_impact = 11; + + // This metric measures the impact to the availability of the impacted + // component resulting from a successfully exploited vulnerability. + Impact availability_impact = 12; +} diff --git a/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml b/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml new file mode 100644 index 00000000..70e35c15 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/clirr-ignored-differences.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java new file mode 100644 index 00000000..db84fcf3 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicies.java @@ -0,0 +1,50397 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1beta/guest_policies.proto + +package com.google.cloud.osconfig.v1beta; + +public final class GuestPolicies { + private GuestPolicies() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * + * + *
+   * The desired state that the OS Config agent maintains on the VM instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.DesiredState} + */ + public enum DesiredState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default is to ensure the package is installed.
+     * 
+ * + * DESIRED_STATE_UNSPECIFIED = 0; + */ + DESIRED_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The agent ensures that the package is installed.
+     * 
+ * + * INSTALLED = 1; + */ + INSTALLED(1), + /** + * + * + *
+     * The agent ensures that the package is installed and
+     * periodically checks for and install any updates.
+     * 
+ * + * UPDATED = 2; + */ + UPDATED(2), + /** + * + * + *
+     * The agent ensures that the package is not installed and uninstall it
+     * if detected.
+     * 
+ * + * REMOVED = 3; + */ + REMOVED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The default is to ensure the package is installed.
+     * 
+ * + * DESIRED_STATE_UNSPECIFIED = 0; + */ + public static final int DESIRED_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The agent ensures that the package is installed.
+     * 
+ * + * INSTALLED = 1; + */ + public static final int INSTALLED_VALUE = 1; + /** + * + * + *
+     * The agent ensures that the package is installed and
+     * periodically checks for and install any updates.
+     * 
+ * + * UPDATED = 2; + */ + public static final int UPDATED_VALUE = 2; + /** + * + * + *
+     * The agent ensures that the package is not installed and uninstall it
+     * if detected.
+     * 
+ * + * REMOVED = 3; + */ + public static final int REMOVED_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 DesiredState 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 DesiredState forNumber(int value) { + switch (value) { + case 0: + return DESIRED_STATE_UNSPECIFIED; + case 1: + return INSTALLED; + case 2: + return UPDATED; + case 3: + return REMOVED; + 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 DesiredState findValueByNumber(int number) { + return DesiredState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.getDescriptor().getEnumTypes().get(0); + } + + private static final DesiredState[] VALUES = values(); + + public static DesiredState 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 DesiredState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1beta.DesiredState) + } + + public interface GuestPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.GuestPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Unique name of the resource in this project using one of the following
+     * forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. Unique name of the resource in this project using one of the following
+     * forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Description of the guest policy. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Description of the guest policy. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Output only. Time this guest policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+     * Output only. Time this guest policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+     * Output only. Time this guest policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Output only. Last time this guest policy was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * Output only. Last time this guest policy was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * Output only. Last time this guest policy was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * Required. Specifies the VM instances that are assigned to this policy. This allows
+     * you to target sets or groups of VM instances by different parameters such
+     * as labels, names, OS, or zones.
+     * If left empty, all VM instances underneath this policy are targeted.
+     * At the same level in the resource hierarchy (that is within a project), the
+     * service prevents the creation of multiple policies that conflict with
+     * each other. For more information, see how the service [handles assignment
+     * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assignment field is set. + */ + boolean hasAssignment(); + /** + * + * + *
+     * Required. Specifies the VM instances that are assigned to this policy. This allows
+     * you to target sets or groups of VM instances by different parameters such
+     * as labels, names, OS, or zones.
+     * If left empty, all VM instances underneath this policy are targeted.
+     * At the same level in the resource hierarchy (that is within a project), the
+     * service prevents the creation of multiple policies that conflict with
+     * each other. For more information, see how the service [handles assignment
+     * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assignment. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment getAssignment(); + /** + * + * + *
+     * Required. Specifies the VM instances that are assigned to this policy. This allows
+     * you to target sets or groups of VM instances by different parameters such
+     * as labels, names, OS, or zones.
+     * If left empty, all VM instances underneath this policy are targeted.
+     * At the same level in the resource hierarchy (that is within a project), the
+     * service prevents the creation of multiple policies that conflict with
+     * each other. For more information, see how the service [handles assignment
+     * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder getAssignmentOrBuilder(); + + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + java.util.List getPackagesList(); + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Package getPackages(int index); + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + int getPackagesCount(); + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + java.util.List + getPackagesOrBuilderList(); + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder getPackagesOrBuilder(int index); + + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + java.util.List + getPackageRepositoriesList(); + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository getPackageRepositories( + int index); + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + int getPackageRepositoriesCount(); + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + getPackageRepositoriesOrBuilderList(); + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder + getPackageRepositoriesOrBuilder(int index); + + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + java.util.List getRecipesList(); + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe getRecipes(int index); + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + int getRecipesCount(); + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + java.util.List + getRecipesOrBuilderList(); + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder getRecipesOrBuilder( + int index); + + /** + * + * + *
+     * The etag for this guest policy.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 10; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+     * The etag for this guest policy.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + } + /** + * + * + *
+   * An OS Config resource representing a guest configuration policy. These
+   * policies represent the desired state for VM instance guest environments
+   * including packages to install or remove, package repository configurations,
+   * and software to install.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GuestPolicy} + */ + public static final class GuestPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.GuestPolicy) + GuestPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use GuestPolicy.newBuilder() to construct. + private GuestPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GuestPolicy() { + name_ = ""; + description_ = ""; + packages_ = java.util.Collections.emptyList(); + packageRepositories_ = java.util.Collections.emptyList(); + recipes_ = java.util.Collections.emptyList(); + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GuestPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GuestPolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + 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 50: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder subBuilder = null; + if (assignment_ != null) { + subBuilder = assignment_.toBuilder(); + } + assignment_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(assignment_); + assignment_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + packages_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package>(); + mutable_bitField0_ |= 0x00000001; + } + packages_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.parser(), + extensionRegistry)); + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository>(); + mutable_bitField0_ |= 0x00000002; + } + packageRepositories_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.parser(), + extensionRegistry)); + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + recipes_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe>(); + mutable_bitField0_ |= 0x00000004; + } + recipes_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.parser(), + extensionRegistry)); + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + etag_ = 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)) { + packages_ = java.util.Collections.unmodifiableList(packages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = java.util.Collections.unmodifiableList(packageRepositories_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + recipes_ = java.util.Collections.unmodifiableList(recipes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GuestPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GuestPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. Unique name of the resource in this project using one of the following
+     * forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Unique name of the resource in this project using one of the following
+     * forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Description of the guest policy. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description of the guest policy. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+     * Output only. Time this guest policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * Output only. Time this guest policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+     * Output only. Time this guest policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * Output only. Last time this guest policy was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * Output only. Last time this guest policy was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * Output only. Last time this guest policy was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int ASSIGNMENT_FIELD_NUMBER = 6; + private com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment assignment_; + /** + * + * + *
+     * Required. Specifies the VM instances that are assigned to this policy. This allows
+     * you to target sets or groups of VM instances by different parameters such
+     * as labels, names, OS, or zones.
+     * If left empty, all VM instances underneath this policy are targeted.
+     * At the same level in the resource hierarchy (that is within a project), the
+     * service prevents the creation of multiple policies that conflict with
+     * each other. For more information, see how the service [handles assignment
+     * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assignment field is set. + */ + @java.lang.Override + public boolean hasAssignment() { + return assignment_ != null; + } + /** + * + * + *
+     * Required. Specifies the VM instances that are assigned to this policy. This allows
+     * you to target sets or groups of VM instances by different parameters such
+     * as labels, names, OS, or zones.
+     * If left empty, all VM instances underneath this policy are targeted.
+     * At the same level in the resource hierarchy (that is within a project), the
+     * service prevents the creation of multiple policies that conflict with
+     * each other. For more information, see how the service [handles assignment
+     * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assignment. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment getAssignment() { + return assignment_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.getDefaultInstance() + : assignment_; + } + /** + * + * + *
+     * Required. Specifies the VM instances that are assigned to this policy. This allows
+     * you to target sets or groups of VM instances by different parameters such
+     * as labels, names, OS, or zones.
+     * If left empty, all VM instances underneath this policy are targeted.
+     * At the same level in the resource hierarchy (that is within a project), the
+     * service prevents the creation of multiple policies that conflict with
+     * each other. For more information, see how the service [handles assignment
+     * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder + getAssignmentOrBuilder() { + return getAssignment(); + } + + public static final int PACKAGES_FIELD_NUMBER = 7; + private java.util.List packages_; + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + @java.lang.Override + public java.util.List + getPackagesList() { + return packages_; + } + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + @java.lang.Override + public java.util.List + getPackagesOrBuilderList() { + return packages_; + } + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + @java.lang.Override + public int getPackagesCount() { + return packages_.size(); + } + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package getPackages(int index) { + return packages_.get(index); + } + /** + * + * + *
+     * The software packages to be managed by this policy.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder getPackagesOrBuilder( + int index) { + return packages_.get(index); + } + + public static final int PACKAGE_REPOSITORIES_FIELD_NUMBER = 8; + private java.util.List + packageRepositories_; + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + @java.lang.Override + public java.util.List + getPackageRepositoriesList() { + return packageRepositories_; + } + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + getPackageRepositoriesOrBuilderList() { + return packageRepositories_; + } + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + @java.lang.Override + public int getPackageRepositoriesCount() { + return packageRepositories_.size(); + } + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository getPackageRepositories( + int index) { + return packageRepositories_.get(index); + } + /** + * + * + *
+     * A list of package repositories to configure on the VM instance. This is
+     * done before any other configs are applied so they can use these repos.
+     * Package repositories are only configured if the corresponding package
+     * manager(s) are available.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder + getPackageRepositoriesOrBuilder(int index) { + return packageRepositories_.get(index); + } + + public static final int RECIPES_FIELD_NUMBER = 9; + private java.util.List recipes_; + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + @java.lang.Override + public java.util.List + getRecipesList() { + return recipes_; + } + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder> + getRecipesOrBuilderList() { + return recipes_; + } + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + @java.lang.Override + public int getRecipesCount() { + return recipes_.size(); + } + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe getRecipes(int index) { + return recipes_.get(index); + } + /** + * + * + *
+     * A list of Recipes to install on the VM instance.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder + getRecipesOrBuilder(int index) { + return recipes_.get(index); + } + + public static final int ETAG_FIELD_NUMBER = 10; + private volatile java.lang.Object etag_; + /** + * + * + *
+     * The etag for this guest policy.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 10; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+     * The etag for this guest policy.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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 (assignment_ != null) { + output.writeMessage(6, getAssignment()); + } + for (int i = 0; i < packages_.size(); i++) { + output.writeMessage(7, packages_.get(i)); + } + for (int i = 0; i < packageRepositories_.size(); i++) { + output.writeMessage(8, packageRepositories_.get(i)); + } + for (int i = 0; i < recipes_.size(); i++) { + output.writeMessage(9, recipes_.get(i)); + } + if (!getEtagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, etag_); + } + 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 (assignment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getAssignment()); + } + for (int i = 0; i < packages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, packages_.get(i)); + } + for (int i = 0; i < packageRepositories_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, packageRepositories_.get(i)); + } + for (int i = 0; i < recipes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, recipes_.get(i)); + } + if (!getEtagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, etag_); + } + 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.v1beta.GuestPolicies.GuestPolicy)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy) obj; + + if (!getName().equals(other.getName())) 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 (hasAssignment() != other.hasAssignment()) return false; + if (hasAssignment()) { + if (!getAssignment().equals(other.getAssignment())) return false; + } + if (!getPackagesList().equals(other.getPackagesList())) return false; + if (!getPackageRepositoriesList().equals(other.getPackageRepositoriesList())) return false; + if (!getRecipesList().equals(other.getRecipesList())) return false; + if (!getEtag().equals(other.getEtag())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasAssignment()) { + hash = (37 * hash) + ASSIGNMENT_FIELD_NUMBER; + hash = (53 * hash) + getAssignment().hashCode(); + } + if (getPackagesCount() > 0) { + hash = (37 * hash) + PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + getPackagesList().hashCode(); + } + if (getPackageRepositoriesCount() > 0) { + hash = (37 * hash) + PACKAGE_REPOSITORIES_FIELD_NUMBER; + hash = (53 * hash) + getPackageRepositoriesList().hashCode(); + } + if (getRecipesCount() > 0) { + hash = (37 * hash) + RECIPES_FIELD_NUMBER; + hash = (53 * hash) + getRecipesList().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy 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.v1beta.GuestPolicies.GuestPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy 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.v1beta.GuestPolicies.GuestPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy 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.v1beta.GuestPolicies.GuestPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy 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.v1beta.GuestPolicies.GuestPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy 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.v1beta.GuestPolicies.GuestPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An OS Config resource representing a guest configuration policy. These
+     * policies represent the desired state for VM instance guest environments
+     * including packages to install or remove, package repository configurations,
+     * and software to install.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GuestPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GuestPolicy) + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GuestPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GuestPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPackagesFieldBuilder(); + getPackageRepositoriesFieldBuilder(); + getRecipesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + if (assignmentBuilder_ == null) { + assignment_ = null; + } else { + assignment_ = null; + assignmentBuilder_ = null; + } + if (packagesBuilder_ == null) { + packages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + packagesBuilder_.clear(); + } + if (packageRepositoriesBuilder_ == null) { + packageRepositories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + packageRepositoriesBuilder_.clear(); + } + if (recipesBuilder_ == null) { + recipes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + recipesBuilder_.clear(); + } + etag_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GuestPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + 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(); + } + if (assignmentBuilder_ == null) { + result.assignment_ = assignment_; + } else { + result.assignment_ = assignmentBuilder_.build(); + } + if (packagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + packages_ = java.util.Collections.unmodifiableList(packages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.packages_ = packages_; + } else { + result.packages_ = packagesBuilder_.build(); + } + if (packageRepositoriesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = java.util.Collections.unmodifiableList(packageRepositories_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.packageRepositories_ = packageRepositories_; + } else { + result.packageRepositories_ = packageRepositoriesBuilder_.build(); + } + if (recipesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + recipes_ = java.util.Collections.unmodifiableList(recipes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.recipes_ = recipes_; + } else { + result.recipes_ = recipesBuilder_.build(); + } + result.etag_ = etag_; + 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.v1beta.GuestPolicies.GuestPolicy) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasAssignment()) { + mergeAssignment(other.getAssignment()); + } + if (packagesBuilder_ == null) { + if (!other.packages_.isEmpty()) { + if (packages_.isEmpty()) { + packages_ = other.packages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePackagesIsMutable(); + packages_.addAll(other.packages_); + } + onChanged(); + } + } else { + if (!other.packages_.isEmpty()) { + if (packagesBuilder_.isEmpty()) { + packagesBuilder_.dispose(); + packagesBuilder_ = null; + packages_ = other.packages_; + bitField0_ = (bitField0_ & ~0x00000001); + packagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPackagesFieldBuilder() + : null; + } else { + packagesBuilder_.addAllMessages(other.packages_); + } + } + } + if (packageRepositoriesBuilder_ == null) { + if (!other.packageRepositories_.isEmpty()) { + if (packageRepositories_.isEmpty()) { + packageRepositories_ = other.packageRepositories_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.addAll(other.packageRepositories_); + } + onChanged(); + } + } else { + if (!other.packageRepositories_.isEmpty()) { + if (packageRepositoriesBuilder_.isEmpty()) { + packageRepositoriesBuilder_.dispose(); + packageRepositoriesBuilder_ = null; + packageRepositories_ = other.packageRepositories_; + bitField0_ = (bitField0_ & ~0x00000002); + packageRepositoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPackageRepositoriesFieldBuilder() + : null; + } else { + packageRepositoriesBuilder_.addAllMessages(other.packageRepositories_); + } + } + } + if (recipesBuilder_ == null) { + if (!other.recipes_.isEmpty()) { + if (recipes_.isEmpty()) { + recipes_ = other.recipes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRecipesIsMutable(); + recipes_.addAll(other.recipes_); + } + onChanged(); + } + } else { + if (!other.recipes_.isEmpty()) { + if (recipesBuilder_.isEmpty()) { + recipesBuilder_.dispose(); + recipesBuilder_ = null; + recipes_ = other.recipes_; + bitField0_ = (bitField0_ & ~0x00000004); + recipesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRecipesFieldBuilder() + : null; + } else { + recipesBuilder_.addAllMessages(other.recipes_); + } + } + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + 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.v1beta.GuestPolicies.GuestPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. Unique name of the resource in this project using one of the following
+       * forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Unique name of the resource in this project using one of the following
+       * forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Unique name of the resource in this project using one of the following
+       * forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Unique name of the resource in this project using one of the following
+       * forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Unique name of the resource in this project using one of the following
+       * forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Description of the guest policy. 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 guest policy. 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 guest policy. 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 guest policy. 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 guest policy. 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_; + /** + * + * + *
+       * Output only. Time this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+       * Output only. Time this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. Time this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 this guest policy was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+       * Output only. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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. Last time this guest policy was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + 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.cloud.osconfig.v1beta.GuestPolicies.Assignment assignment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder> + assignmentBuilder_; + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assignment field is set. + */ + public boolean hasAssignment() { + return assignmentBuilder_ != null || assignment_ != null; + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assignment. + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment getAssignment() { + if (assignmentBuilder_ == null) { + return assignment_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.getDefaultInstance() + : assignment_; + } else { + return assignmentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssignment( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment value) { + if (assignmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assignment_ = value; + onChanged(); + } else { + assignmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssignment( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder builderForValue) { + if (assignmentBuilder_ == null) { + assignment_ = builderForValue.build(); + onChanged(); + } else { + assignmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAssignment( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment value) { + if (assignmentBuilder_ == null) { + if (assignment_ != null) { + assignment_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.newBuilder(assignment_) + .mergeFrom(value) + .buildPartial(); + } else { + assignment_ = value; + } + onChanged(); + } else { + assignmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAssignment() { + if (assignmentBuilder_ == null) { + assignment_ = null; + onChanged(); + } else { + assignment_ = null; + assignmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder + getAssignmentBuilder() { + + onChanged(); + return getAssignmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder + getAssignmentOrBuilder() { + if (assignmentBuilder_ != null) { + return assignmentBuilder_.getMessageOrBuilder(); + } else { + return assignment_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.getDefaultInstance() + : assignment_; + } + } + /** + * + * + *
+       * Required. Specifies the VM instances that are assigned to this policy. This allows
+       * you to target sets or groups of VM instances by different parameters such
+       * as labels, names, OS, or zones.
+       * If left empty, all VM instances underneath this policy are targeted.
+       * At the same level in the resource hierarchy (that is within a project), the
+       * service prevents the creation of multiple policies that conflict with
+       * each other. For more information, see how the service [handles assignment
+       * conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts).
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.Assignment assignment = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder> + getAssignmentFieldBuilder() { + if (assignmentBuilder_ == null) { + assignmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder>( + getAssignment(), getParentForChildren(), isClean()); + assignment_ = null; + } + return assignmentBuilder_; + } + + private java.util.List packages_ = + java.util.Collections.emptyList(); + + private void ensurePackagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + packages_ = + new java.util.ArrayList( + packages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder> + packagesBuilder_; + + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public java.util.List + getPackagesList() { + if (packagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(packages_); + } else { + return packagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public int getPackagesCount() { + if (packagesBuilder_ == null) { + return packages_.size(); + } else { + return packagesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package getPackages(int index) { + if (packagesBuilder_ == null) { + return packages_.get(index); + } else { + return packagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder setPackages( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.Package value) { + if (packagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackagesIsMutable(); + packages_.set(index, value); + onChanged(); + } else { + packagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder setPackages( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder builderForValue) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.set(index, builderForValue.build()); + onChanged(); + } else { + packagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder addPackages(com.google.cloud.osconfig.v1beta.GuestPolicies.Package value) { + if (packagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackagesIsMutable(); + packages_.add(value); + onChanged(); + } else { + packagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder addPackages( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.Package value) { + if (packagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackagesIsMutable(); + packages_.add(index, value); + onChanged(); + } else { + packagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder addPackages( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder builderForValue) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.add(builderForValue.build()); + onChanged(); + } else { + packagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder addPackages( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder builderForValue) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.add(index, builderForValue.build()); + onChanged(); + } else { + packagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder addAllPackages( + java.lang.Iterable + values) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packages_); + onChanged(); + } else { + packagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder clearPackages() { + if (packagesBuilder_ == null) { + packages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + packagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public Builder removePackages(int index) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.remove(index); + onChanged(); + } else { + packagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder getPackagesBuilder( + int index) { + return getPackagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder getPackagesOrBuilder( + int index) { + if (packagesBuilder_ == null) { + return packages_.get(index); + } else { + return packagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder> + getPackagesOrBuilderList() { + if (packagesBuilder_ != null) { + return packagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(packages_); + } + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder addPackagesBuilder() { + return getPackagesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance()); + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder addPackagesBuilder( + int index) { + return getPackagesFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance()); + } + /** + * + * + *
+       * The software packages to be managed by this policy.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Package packages = 7; + */ + public java.util.List + getPackagesBuilderList() { + return getPackagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder> + getPackagesFieldBuilder() { + if (packagesBuilder_ == null) { + packagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder>( + packages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + packages_ = null; + } + return packagesBuilder_; + } + + private java.util.List + packageRepositories_ = java.util.Collections.emptyList(); + + private void ensurePackageRepositoriesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository>( + packageRepositories_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + packageRepositoriesBuilder_; + + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public java.util.List + getPackageRepositoriesList() { + if (packageRepositoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(packageRepositories_); + } else { + return packageRepositoriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public int getPackageRepositoriesCount() { + if (packageRepositoriesBuilder_ == null) { + return packageRepositories_.size(); + } else { + return packageRepositoriesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + getPackageRepositories(int index) { + if (packageRepositoriesBuilder_ == null) { + return packageRepositories_.get(index); + } else { + return packageRepositoriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder setPackageRepositories( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository value) { + if (packageRepositoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageRepositoriesIsMutable(); + packageRepositories_.set(index, value); + onChanged(); + } else { + packageRepositoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder setPackageRepositories( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + builderForValue) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.set(index, builderForValue.build()); + onChanged(); + } else { + packageRepositoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder addPackageRepositories( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository value) { + if (packageRepositoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(value); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder addPackageRepositories( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository value) { + if (packageRepositoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(index, value); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder addPackageRepositories( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + builderForValue) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(builderForValue.build()); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder addPackageRepositories( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + builderForValue) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(index, builderForValue.build()); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder addAllPackageRepositories( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository> + values) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packageRepositories_); + onChanged(); + } else { + packageRepositoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder clearPackageRepositories() { + if (packageRepositoriesBuilder_ == null) { + packageRepositories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + packageRepositoriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public Builder removePackageRepositories(int index) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.remove(index); + onChanged(); + } else { + packageRepositoriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + getPackageRepositoriesBuilder(int index) { + return getPackageRepositoriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder + getPackageRepositoriesOrBuilder(int index) { + if (packageRepositoriesBuilder_ == null) { + return packageRepositories_.get(index); + } else { + return packageRepositoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + getPackageRepositoriesOrBuilderList() { + if (packageRepositoriesBuilder_ != null) { + return packageRepositoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(packageRepositories_); + } + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + addPackageRepositoriesBuilder() { + return getPackageRepositoriesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + addPackageRepositoriesBuilder(int index) { + return getPackageRepositoriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of package repositories to configure on the VM instance. This is
+       * done before any other configs are applied so they can use these repos.
+       * Package repositories are only configured if the corresponding package
+       * manager(s) are available.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PackageRepository package_repositories = 8; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder> + getPackageRepositoriesBuilderList() { + return getPackageRepositoriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + getPackageRepositoriesFieldBuilder() { + if (packageRepositoriesBuilder_ == null) { + packageRepositoriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder>( + packageRepositories_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + packageRepositories_ = null; + } + return packageRepositoriesBuilder_; + } + + private java.util.List + recipes_ = java.util.Collections.emptyList(); + + private void ensureRecipesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + recipes_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe>(recipes_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder> + recipesBuilder_; + + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public java.util.List + getRecipesList() { + if (recipesBuilder_ == null) { + return java.util.Collections.unmodifiableList(recipes_); + } else { + return recipesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public int getRecipesCount() { + if (recipesBuilder_ == null) { + return recipes_.size(); + } else { + return recipesBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe getRecipes(int index) { + if (recipesBuilder_ == null) { + return recipes_.get(index); + } else { + return recipesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder setRecipes( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe value) { + if (recipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipesIsMutable(); + recipes_.set(index, value); + onChanged(); + } else { + recipesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder setRecipes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder builderForValue) { + if (recipesBuilder_ == null) { + ensureRecipesIsMutable(); + recipes_.set(index, builderForValue.build()); + onChanged(); + } else { + recipesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder addRecipes( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe value) { + if (recipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipesIsMutable(); + recipes_.add(value); + onChanged(); + } else { + recipesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder addRecipes( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe value) { + if (recipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecipesIsMutable(); + recipes_.add(index, value); + onChanged(); + } else { + recipesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder addRecipes( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder builderForValue) { + if (recipesBuilder_ == null) { + ensureRecipesIsMutable(); + recipes_.add(builderForValue.build()); + onChanged(); + } else { + recipesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder addRecipes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder builderForValue) { + if (recipesBuilder_ == null) { + ensureRecipesIsMutable(); + recipes_.add(index, builderForValue.build()); + onChanged(); + } else { + recipesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder addAllRecipes( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe> + values) { + if (recipesBuilder_ == null) { + ensureRecipesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, recipes_); + onChanged(); + } else { + recipesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder clearRecipes() { + if (recipesBuilder_ == null) { + recipes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + recipesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public Builder removeRecipes(int index) { + if (recipesBuilder_ == null) { + ensureRecipesIsMutable(); + recipes_.remove(index); + onChanged(); + } else { + recipesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder + getRecipesBuilder(int index) { + return getRecipesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder + getRecipesOrBuilder(int index) { + if (recipesBuilder_ == null) { + return recipes_.get(index); + } else { + return recipesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder> + getRecipesOrBuilderList() { + if (recipesBuilder_ != null) { + return recipesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(recipes_); + } + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder + addRecipesBuilder() { + return getRecipesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance()); + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder + addRecipesBuilder(int index) { + return getRecipesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance()); + } + /** + * + * + *
+       * A list of Recipes to install on the VM instance.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe recipes = 9; + */ + public java.util.List + getRecipesBuilderList() { + return getRecipesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder> + getRecipesFieldBuilder() { + if (recipesBuilder_ == null) { + recipesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder>( + recipes_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + recipes_ = null; + } + return recipesBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+       * The etag for this guest policy.
+       * If this is provided on update, it must match the server's etag.
+       * 
+ * + * string etag = 10; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The etag for this guest policy.
+       * If this is provided on update, it must match the server's etag.
+       * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The etag for this guest policy.
+       * If this is provided on update, it must match the server's etag.
+       * 
+ * + * string etag = 10; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The etag for this guest policy.
+       * If this is provided on update, it must match the server's etag.
+       * 
+ * + * string etag = 10; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+       * The etag for this guest policy.
+       * If this is provided on update, it must match the server's etag.
+       * 
+ * + * string etag = 10; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = 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.v1beta.GuestPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GuestPolicy) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GuestPolicy(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.v1beta.GuestPolicies.GuestPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AssignmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.Assignment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + java.util.List + getGroupLabelsList(); + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel getGroupLabels(int index); + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + int getGroupLabelsCount(); + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder> + getGroupLabelsOrBuilderList(); + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder + getGroupLabelsOrBuilder(int index); + + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @return A list containing the zones. + */ + java.util.List getZonesList(); + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @return The count of zones. + */ + int getZonesCount(); + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @param index The index of the element to return. + * @return The zones at the given index. + */ + java.lang.String getZones(int index); + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @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 instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @return A list containing the instances. + */ + java.util.List getInstancesList(); + /** + * + * + *
+     * Targets any of the instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @return The count of instances. + */ + int getInstancesCount(); + /** + * + * + *
+     * Targets any of the instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @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 VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return A list containing the instanceNamePrefixes. + */ + java.util.List getInstanceNamePrefixesList(); + /** + * + * + *
+     * Targets VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return The count of instanceNamePrefixes. + */ + int getInstanceNamePrefixesCount(); + /** + * + * + *
+     * Targets VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @param index The index of the element to return. + * @return The instanceNamePrefixes at the given index. + */ + java.lang.String getInstanceNamePrefixes(int index); + /** + * + * + *
+     * Targets VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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); + + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + java.util.List + getOsTypesList(); + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType getOsTypes(int index); + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + int getOsTypesCount(); + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder> + getOsTypesOrBuilderList(); + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder getOsTypesOrBuilder( + int index); + } + /** + * + * + *
+   * An assignment represents the group or groups of VM instances that the policy
+   * applies to.
+   * If an assignment is empty, it applies to all VM instances. Otherwise, the
+   * targeted VM instances must meet all the criteria specified. So if both
+   * labels and zones are specified, the policy applies to VM instances with those
+   * labels and in those zones.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Assignment} + */ + public static final class Assignment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.Assignment) + AssignmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Assignment.newBuilder() to construct. + private Assignment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Assignment() { + groupLabels_ = java.util.Collections.emptyList(); + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instances_ = com.google.protobuf.LazyStringArrayList.EMPTY; + instanceNamePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + osTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Assignment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Assignment( + 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)) { + groupLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel>(); + mutable_bitField0_ |= 0x00000001; + } + groupLabels_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel + .parser(), + extensionRegistry)); + break; + } + case 18: + { + 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 26: + { + 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 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + instanceNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + instanceNamePrefixes_.add(s); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + osTypes_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType>(); + mutable_bitField0_ |= 0x00000010; + } + osTypes_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + 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(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + osTypes_ = java.util.Collections.unmodifiableList(osTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder.class); + } + + public interface GroupLabelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.Assignment.GroupLabel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + int getLabelsCount(); + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for an
+       * instance to be included in this assignment group.
+       * 
+ * + * 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 an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for an
+       * instance to be included in this assignment group.
+       * 
+ * + * 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 an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + } + /** + * + * + *
+     * Represents a group of VM intances that can be identified as having all
+     * these labels, for example "env=prod and app=web".
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Assignment.GroupLabel} + */ + public static final class GroupLabel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.Assignment.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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_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 an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Google Compute Engine instance labels that must be present for an
+       * instance to be included in this assignment group.
+       * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + 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.v1beta.GuestPolicies.Assignment.GroupLabel)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.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 VM intances that can be identified as having all
+       * these labels, for example "env=prod and app=web".
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Assignment.GroupLabel} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.Assignment.GroupLabel) + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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 an
+         * instance to be included in this assignment group.
+         * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for an
+         * instance to be included in this assignment group.
+         * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for an
+         * instance to be included in this assignment group.
+         * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for an
+         * instance to be included in this assignment group.
+         * 
+ * + * map<string, string> labels = 1; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+         * Google Compute Engine instance labels that must be present for an
+         * instance to be included in this assignment group.
+         * 
+ * + * 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 an
+         * instance to be included in this assignment group.
+         * 
+ * + * 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 an
+         * instance to be included in this assignment group.
+         * 
+ * + * 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.v1beta.Assignment.GroupLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.Assignment.GroupLabel) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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.v1beta.GuestPolicies.Assignment.GroupLabel + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OsTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.Assignment.OsType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS short name, for example "debian" or "windows".
+       * 
+ * + * string os_short_name = 1; + * + * @return The osShortName. + */ + java.lang.String getOsShortName(); + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS short name, for example "debian" or "windows".
+       * 
+ * + * string os_short_name = 1; + * + * @return The bytes for osShortName. + */ + com.google.protobuf.ByteString getOsShortNameBytes(); + + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * following OS version.
+       * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + java.lang.String getOsVersion(); + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * following OS version.
+       * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + com.google.protobuf.ByteString getOsVersionBytes(); + + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS architecture.
+       * 
+ * + * string os_architecture = 3; + * + * @return The osArchitecture. + */ + java.lang.String getOsArchitecture(); + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS architecture.
+       * 
+ * + * string os_architecture = 3; + * + * @return The bytes for osArchitecture. + */ + com.google.protobuf.ByteString getOsArchitectureBytes(); + } + /** + * + * + *
+     * Defines the criteria for selecting VM Instances by OS type.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Assignment.OsType} + */ + public static final class OsType extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.Assignment.OsType) + OsTypeOrBuilder { + private static final long serialVersionUID = 0L; + // Use OsType.newBuilder() to construct. + private OsType(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OsType() { + osShortName_ = ""; + osVersion_ = ""; + osArchitecture_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OsType(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OsType( + 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(); + + osShortName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + osVersion_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + osArchitecture_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder.class); + } + + public static final int OS_SHORT_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object osShortName_; + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS short name, for example "debian" or "windows".
+       * 
+ * + * string os_short_name = 1; + * + * @return The osShortName. + */ + @java.lang.Override + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } + } + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS short name, for example "debian" or "windows".
+       * 
+ * + * string os_short_name = 1; + * + * @return The bytes for osShortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object osVersion_; + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * following OS version.
+       * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + @java.lang.Override + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } + } + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * following OS version.
+       * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_ARCHITECTURE_FIELD_NUMBER = 3; + private volatile java.lang.Object osArchitecture_; + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS architecture.
+       * 
+ * + * string os_architecture = 3; + * + * @return The osArchitecture. + */ + @java.lang.Override + public java.lang.String getOsArchitecture() { + java.lang.Object ref = osArchitecture_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osArchitecture_ = s; + return s; + } + } + /** + * + * + *
+       * Targets VM instances with OS Inventory enabled and having the following
+       * OS architecture.
+       * 
+ * + * string os_architecture = 3; + * + * @return The bytes for osArchitecture. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsArchitectureBytes() { + java.lang.Object ref = osArchitecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osArchitecture_ = 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 (!getOsShortNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, osShortName_); + } + if (!getOsVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osVersion_); + } + if (!getOsArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, osArchitecture_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOsShortNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, osShortName_); + } + if (!getOsVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, osVersion_); + } + if (!getOsArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, osArchitecture_); + } + 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.v1beta.GuestPolicies.Assignment.OsType)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType) obj; + + if (!getOsShortName().equals(other.getOsShortName())) return false; + if (!getOsVersion().equals(other.getOsVersion())) return false; + if (!getOsArchitecture().equals(other.getOsArchitecture())) 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) + OS_SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOsShortName().hashCode(); + hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsVersion().hashCode(); + hash = (37 * hash) + OS_ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getOsArchitecture().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType 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.v1beta.GuestPolicies.Assignment.OsType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType 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.v1beta.GuestPolicies.Assignment.OsType parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType 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.v1beta.GuestPolicies.Assignment.OsType + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + 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.v1beta.GuestPolicies.Assignment.OsType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType 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.v1beta.GuestPolicies.Assignment.OsType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Defines the criteria for selecting VM Instances by OS type.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Assignment.OsType} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.Assignment.OsType) + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.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(); + osShortName_ = ""; + + osVersion_ = ""; + + osArchitecture_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType(this); + result.osShortName_ = osShortName_; + result.osVersion_ = osVersion_; + result.osArchitecture_ = osArchitecture_; + 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.v1beta.GuestPolicies.Assignment.OsType) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + .getDefaultInstance()) return this; + if (!other.getOsShortName().isEmpty()) { + osShortName_ = other.osShortName_; + onChanged(); + } + if (!other.getOsVersion().isEmpty()) { + osVersion_ = other.osVersion_; + onChanged(); + } + if (!other.getOsArchitecture().isEmpty()) { + osArchitecture_ = other.osArchitecture_; + 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.v1beta.GuestPolicies.Assignment.OsType parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object osShortName_ = ""; + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS short name, for example "debian" or "windows".
+         * 
+ * + * string os_short_name = 1; + * + * @return The osShortName. + */ + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS short name, for example "debian" or "windows".
+         * 
+ * + * string os_short_name = 1; + * + * @return The bytes for osShortName. + */ + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS short name, for example "debian" or "windows".
+         * 
+ * + * string os_short_name = 1; + * + * @param value The osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osShortName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS short name, for example "debian" or "windows".
+         * 
+ * + * string os_short_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearOsShortName() { + + osShortName_ = getDefaultInstance().getOsShortName(); + onChanged(); + return this; + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS short name, for example "debian" or "windows".
+         * 
+ * + * string os_short_name = 1; + * + * @param value The bytes for osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osShortName_ = value; + onChanged(); + return this; + } + + private java.lang.Object osVersion_ = ""; + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * following OS version.
+         * 
+ * + * string os_version = 2; + * + * @return The osVersion. + */ + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * following OS version.
+         * 
+ * + * string os_version = 2; + * + * @return The bytes for osVersion. + */ + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * following OS version.
+         * 
+ * + * string os_version = 2; + * + * @param value The osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * following OS version.
+         * 
+ * + * string os_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearOsVersion() { + + osVersion_ = getDefaultInstance().getOsVersion(); + onChanged(); + return this; + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * following OS version.
+         * 
+ * + * string os_version = 2; + * + * @param value The bytes for osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object osArchitecture_ = ""; + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS architecture.
+         * 
+ * + * string os_architecture = 3; + * + * @return The osArchitecture. + */ + public java.lang.String getOsArchitecture() { + java.lang.Object ref = osArchitecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osArchitecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS architecture.
+         * 
+ * + * string os_architecture = 3; + * + * @return The bytes for osArchitecture. + */ + public com.google.protobuf.ByteString getOsArchitectureBytes() { + java.lang.Object ref = osArchitecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osArchitecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS architecture.
+         * 
+ * + * string os_architecture = 3; + * + * @param value The osArchitecture to set. + * @return This builder for chaining. + */ + public Builder setOsArchitecture(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osArchitecture_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS architecture.
+         * 
+ * + * string os_architecture = 3; + * + * @return This builder for chaining. + */ + public Builder clearOsArchitecture() { + + osArchitecture_ = getDefaultInstance().getOsArchitecture(); + onChanged(); + return this; + } + /** + * + * + *
+         * Targets VM instances with OS Inventory enabled and having the following
+         * OS architecture.
+         * 
+ * + * string os_architecture = 3; + * + * @param value The bytes for osArchitecture to set. + * @return This builder for chaining. + */ + public Builder setOsArchitectureBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osArchitecture_ = 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.v1beta.Assignment.OsType) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.Assignment.OsType) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OsType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OsType(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.v1beta.GuestPolicies.Assignment.OsType + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int GROUP_LABELS_FIELD_NUMBER = 1; + private java.util.List + groupLabels_; + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + @java.lang.Override + public java.util.List + getGroupLabelsList() { + return groupLabels_; + } + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder> + getGroupLabelsOrBuilderList() { + return groupLabels_; + } + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + @java.lang.Override + public int getGroupLabelsCount() { + return groupLabels_.size(); + } + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel getGroupLabels( + int index) { + return groupLabels_.get(index); + } + /** + * + * + *
+     * Targets instances matching at least one of these label sets. This allows
+     * an assignment to target disparate groups, for example "env=prod or
+     * env=staging".
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder + getGroupLabelsOrBuilder(int index) { + return groupLabels_.get(index); + } + + public static final int ZONES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList zones_; + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_; + } + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+     * Targets instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @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 instances in any of these zones. Leave empty to target instances
+     * in any zone.
+     * Zonal targeting is uncommon and is supported to facilitate the management
+     * of changes by zone.
+     * 
+ * + * repeated string zones = 2; + * + * @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 = 3; + private com.google.protobuf.LazyStringList instances_; + /** + * + * + *
+     * Targets any of the instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @return A list containing the instances. + */ + public com.google.protobuf.ProtocolStringList getInstancesList() { + return instances_; + } + /** + * + * + *
+     * Targets any of the instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @return The count of instances. + */ + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+     * Targets any of the instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+     * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+     * Instance targeting is uncommon and is supported to facilitate the
+     * management of changes by the instance or to target specific VM instances
+     * for development and testing.
+     * Only supported for project-level policies and must reference instances
+     * within this project.
+     * 
+ * + * repeated string instances = 3; + * + * @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 = 4; + private com.google.protobuf.LazyStringList instanceNamePrefixes_; + /** + * + * + *
+     * Targets VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return A list containing the instanceNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getInstanceNamePrefixesList() { + return instanceNamePrefixes_; + } + /** + * + * + *
+     * Targets VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return The count of instanceNamePrefixes. + */ + public int getInstanceNamePrefixesCount() { + return instanceNamePrefixes_.size(); + } + /** + * + * + *
+     * Targets VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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 VM instances whose name starts with one of these prefixes.
+     * Like labels, this is another way to group VM instances when targeting
+     * configs, for example prefix="prod-".
+     * Only supported for project-level policies.
+     * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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); + } + + public static final int OS_TYPES_FIELD_NUMBER = 5; + private java.util.List + osTypes_; + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + @java.lang.Override + public java.util.List + getOsTypesList() { + return osTypes_; + } + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder> + getOsTypesOrBuilderList() { + return osTypes_; + } + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + @java.lang.Override + public int getOsTypesCount() { + return osTypes_.size(); + } + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType getOsTypes(int index) { + return osTypes_.get(index); + } + /** + * + * + *
+     * Targets VM instances matching at least one of the following OS types.
+     * VM instances must match all supplied criteria for a given OsType to be
+     * included.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder + getOsTypesOrBuilder(int index) { + return osTypes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < groupLabels_.size(); i++) { + output.writeMessage(1, groupLabels_.get(i)); + } + for (int i = 0; i < zones_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, zones_.getRaw(i)); + } + for (int i = 0; i < instances_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instances_.getRaw(i)); + } + for (int i = 0; i < instanceNamePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 4, instanceNamePrefixes_.getRaw(i)); + } + for (int i = 0; i < osTypes_.size(); i++) { + output.writeMessage(5, osTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupLabels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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(); + } + for (int i = 0; i < osTypes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, osTypes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment) obj; + + 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 (!getOsTypesList().equals(other.getOsTypesList())) 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 (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(); + } + if (getOsTypesCount() > 0) { + hash = (37 * hash) + OS_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getOsTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment 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.v1beta.GuestPolicies.Assignment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment 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.v1beta.GuestPolicies.Assignment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment 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.v1beta.GuestPolicies.Assignment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment 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.v1beta.GuestPolicies.Assignment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment 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.v1beta.GuestPolicies.Assignment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An assignment represents the group or groups of VM instances that the policy
+     * applies to.
+     * If an assignment is empty, it applies to all VM instances. Otherwise, the
+     * targeted VM instances must meet all the criteria specified. So if both
+     * labels and zones are specified, the policy applies to VM instances with those
+     * labels and in those zones.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Assignment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.Assignment) + com.google.cloud.osconfig.v1beta.GuestPolicies.AssignmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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(); + getOsTypesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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); + if (osTypesBuilder_ == null) { + osTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + osTypesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment(this); + int from_bitField0_ = bitField0_; + 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_; + if (osTypesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + osTypes_ = java.util.Collections.unmodifiableList(osTypes_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.osTypes_ = osTypes_; + } else { + result.osTypes_ = osTypesBuilder_.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.v1beta.GuestPolicies.Assignment) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment other) { + if (other == com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.getDefaultInstance()) + return this; + 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(); + } + if (osTypesBuilder_ == null) { + if (!other.osTypes_.isEmpty()) { + if (osTypes_.isEmpty()) { + osTypes_ = other.osTypes_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOsTypesIsMutable(); + osTypes_.addAll(other.osTypes_); + } + onChanged(); + } + } else { + if (!other.osTypes_.isEmpty()) { + if (osTypesBuilder_.isEmpty()) { + osTypesBuilder_.dispose(); + osTypesBuilder_ = null; + osTypes_ = other.osTypes_; + bitField0_ = (bitField0_ & ~0x00000010); + osTypesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOsTypesFieldBuilder() + : null; + } else { + osTypesBuilder_.addAllMessages(other.osTypes_); + } + } + } + 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.v1beta.GuestPolicies.Assignment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + 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.v1beta.GuestPolicies.Assignment.GroupLabel>( + groupLabels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder> + groupLabelsBuilder_; + + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public java.util.List + getGroupLabelsList() { + if (groupLabelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupLabels_); + } else { + return groupLabelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public int getGroupLabelsCount() { + if (groupLabelsBuilder_ == null) { + return groupLabels_.size(); + } else { + return groupLabelsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel getGroupLabels( + int index) { + if (groupLabelsBuilder_ == null) { + return groupLabels_.get(index); + } else { + return groupLabelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder setGroupLabels( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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 instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder setGroupLabels( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + builderForValue) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.set(index, builderForValue.build()); + onChanged(); + } else { + groupLabelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder addGroupLabels( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel value) { + if (groupLabelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupLabelsIsMutable(); + groupLabels_.add(value); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder addGroupLabels( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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 instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder addGroupLabels( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + builderForValue) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.add(builderForValue.build()); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder addGroupLabels( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + builderForValue) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.add(index, builderForValue.build()); + onChanged(); + } else { + groupLabelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder addAllGroupLabels( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel> + values) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupLabels_); + onChanged(); + } else { + groupLabelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder clearGroupLabels() { + if (groupLabelsBuilder_ == null) { + groupLabels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupLabelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public Builder removeGroupLabels(int index) { + if (groupLabelsBuilder_ == null) { + ensureGroupLabelsIsMutable(); + groupLabels_.remove(index); + onChanged(); + } else { + groupLabelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + getGroupLabelsBuilder(int index) { + return getGroupLabelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder + getGroupLabelsOrBuilder(int index) { + if (groupLabelsBuilder_ == null) { + return groupLabels_.get(index); + } else { + return groupLabelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder> + getGroupLabelsOrBuilderList() { + if (groupLabelsBuilder_ != null) { + return groupLabelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupLabels_); + } + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + addGroupLabelsBuilder() { + return getGroupLabelsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel + .getDefaultInstance()); + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder + addGroupLabelsBuilder(int index) { + return getGroupLabelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel + .getDefaultInstance()); + } + /** + * + * + *
+       * Targets instances matching at least one of these label sets. This allows
+       * an assignment to target disparate groups, for example "env=prod or
+       * env=staging".
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1; + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder> + getGroupLabelsBuilderList() { + return getGroupLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder> + getGroupLabelsFieldBuilder() { + if (groupLabelsBuilder_ == null) { + groupLabelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabel.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.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 instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @return A list containing the zones. + */ + public com.google.protobuf.ProtocolStringList getZonesList() { + return zones_.getUnmodifiableView(); + } + /** + * + * + *
+       * Targets instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @return The count of zones. + */ + public int getZonesCount() { + return zones_.size(); + } + /** + * + * + *
+       * Targets instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @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 instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @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 instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @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 instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @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 instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @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 instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @return This builder for chaining. + */ + public Builder clearZones() { + zones_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets instances in any of these zones. Leave empty to target instances
+       * in any zone.
+       * Zonal targeting is uncommon and is supported to facilitate the management
+       * of changes by zone.
+       * 
+ * + * repeated string zones = 2; + * + * @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 instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @return A list containing the instances. + */ + public com.google.protobuf.ProtocolStringList getInstancesList() { + return instances_.getUnmodifiableView(); + } + /** + * + * + *
+       * Targets any of the instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @return The count of instances. + */ + public int getInstancesCount() { + return instances_.size(); + } + /** + * + * + *
+       * Targets any of the instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @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 instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @return This builder for chaining. + */ + public Builder clearInstances() { + instances_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets any of the instances specified. Instances are specified by their
+       * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
+       * Instance targeting is uncommon and is supported to facilitate the
+       * management of changes by the instance or to target specific VM instances
+       * for development and testing.
+       * Only supported for project-level policies and must reference instances
+       * within this project.
+       * 
+ * + * repeated string instances = 3; + * + * @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 VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return A list containing the instanceNamePrefixes. + */ + public com.google.protobuf.ProtocolStringList getInstanceNamePrefixesList() { + return instanceNamePrefixes_.getUnmodifiableView(); + } + /** + * + * + *
+       * Targets VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return The count of instanceNamePrefixes. + */ + public int getInstanceNamePrefixesCount() { + return instanceNamePrefixes_.size(); + } + /** + * + * + *
+       * Targets VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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 VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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 VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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 VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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 VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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 VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @return This builder for chaining. + */ + public Builder clearInstanceNamePrefixes() { + instanceNamePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * Targets VM instances whose name starts with one of these prefixes.
+       * Like labels, this is another way to group VM instances when targeting
+       * configs, for example prefix="prod-".
+       * Only supported for project-level policies.
+       * 
+ * + * repeated string instance_name_prefixes = 4; + * + * @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; + } + + private java.util.List + osTypes_ = java.util.Collections.emptyList(); + + private void ensureOsTypesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + osTypes_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType>(osTypes_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder> + osTypesBuilder_; + + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public java.util.List + getOsTypesList() { + if (osTypesBuilder_ == null) { + return java.util.Collections.unmodifiableList(osTypes_); + } else { + return osTypesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public int getOsTypesCount() { + if (osTypesBuilder_ == null) { + return osTypes_.size(); + } else { + return osTypesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType getOsTypes( + int index) { + if (osTypesBuilder_ == null) { + return osTypes_.get(index); + } else { + return osTypesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder setOsTypes( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType value) { + if (osTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsTypesIsMutable(); + osTypes_.set(index, value); + onChanged(); + } else { + osTypesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder setOsTypes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder + builderForValue) { + if (osTypesBuilder_ == null) { + ensureOsTypesIsMutable(); + osTypes_.set(index, builderForValue.build()); + onChanged(); + } else { + osTypesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder addOsTypes( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType value) { + if (osTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsTypesIsMutable(); + osTypes_.add(value); + onChanged(); + } else { + osTypesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder addOsTypes( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType value) { + if (osTypesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOsTypesIsMutable(); + osTypes_.add(index, value); + onChanged(); + } else { + osTypesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder addOsTypes( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder + builderForValue) { + if (osTypesBuilder_ == null) { + ensureOsTypesIsMutable(); + osTypes_.add(builderForValue.build()); + onChanged(); + } else { + osTypesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder addOsTypes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder + builderForValue) { + if (osTypesBuilder_ == null) { + ensureOsTypesIsMutable(); + osTypes_.add(index, builderForValue.build()); + onChanged(); + } else { + osTypesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder addAllOsTypes( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType> + values) { + if (osTypesBuilder_ == null) { + ensureOsTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, osTypes_); + onChanged(); + } else { + osTypesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder clearOsTypes() { + if (osTypesBuilder_ == null) { + osTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + osTypesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public Builder removeOsTypes(int index) { + if (osTypesBuilder_ == null) { + ensureOsTypesIsMutable(); + osTypes_.remove(index); + onChanged(); + } else { + osTypesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder + getOsTypesBuilder(int index) { + return getOsTypesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder + getOsTypesOrBuilder(int index) { + if (osTypesBuilder_ == null) { + return osTypes_.get(index); + } else { + return osTypesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder> + getOsTypesOrBuilderList() { + if (osTypesBuilder_ != null) { + return osTypesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(osTypes_); + } + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder + addOsTypesBuilder() { + return getOsTypesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + .getDefaultInstance()); + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder + addOsTypesBuilder(int index) { + return getOsTypesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType + .getDefaultInstance()); + } + /** + * + * + *
+       * Targets VM instances matching at least one of the following OS types.
+       * VM instances must match all supplied criteria for a given OsType to be
+       * included.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5; + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder> + getOsTypesBuilderList() { + return getOsTypesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder> + getOsTypesFieldBuilder() { + if (osTypesBuilder_ == null) { + osTypesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsType.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder>( + osTypes_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + osTypes_ = null; + } + return osTypesBuilder_; + } + + @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.v1beta.Assignment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.Assignment) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Assignment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Assignment(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.v1beta.GuestPolicies.Assignment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.Package) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the package. A package is uniquely identified for conflict
+     * validation by checking the package name and the manager(s) that the
+     * package targets.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name of the package. A package is uniquely identified for conflict
+     * validation by checking the package name and the manager(s) that the
+     * package targets.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The desired_state the agent should maintain for this package. The
+     * default is to ensure the package is installed.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return The enum numeric value on the wire for desiredState. + */ + int getDesiredStateValue(); + /** + * + * + *
+     * The desired_state the agent should maintain for this package. The
+     * default is to ensure the package is installed.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return The desiredState. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredState(); + + /** + * + * + *
+     * Type of package manager that can be used to install this package.
+     * If a system does not have the package manager, the package is not
+     * installed or removed no error message is returned. By default,
+     * or if you specify `ANY`,
+     * the agent attempts to install and remove this package using the default
+     * package manager. This is useful when creating a policy that applies to
+     * different types of systems.
+     * The default behavior is ANY.
+     * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return The enum numeric value on the wire for manager. + */ + int getManagerValue(); + /** + * + * + *
+     * Type of package manager that can be used to install this package.
+     * If a system does not have the package manager, the package is not
+     * installed or removed no error message is returned. By default,
+     * or if you specify `ANY`,
+     * the agent attempts to install and remove this package using the default
+     * package manager. This is useful when creating a policy that applies to
+     * different types of systems.
+     * The default behavior is ANY.
+     * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return The manager. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager getManager(); + } + /** + * + * + *
+   * Package is a reference to the software package to be installed or removed.
+   * The agent on the VM instance uses the system package manager to apply the
+   * config.
+   * These are the commands that the agent uses to install or remove
+   * packages.
+   * Apt
+   * install: `apt-get update && apt-get -y install package1 package2 package3`
+   * remove: `apt-get -y remove package1 package2 package3`
+   * Yum
+   * install: `yum -y install package1 package2 package3`
+   * remove: `yum -y remove package1 package2 package3`
+   * Zypper
+   * install: `zypper install package1 package2 package3`
+   * remove: `zypper rm package1 package2`
+   * Googet
+   * install: `googet -noconfirm install package1 package2 package3`
+   * remove: `googet -noconfirm remove package1 package2 package3`
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Package} + */ + public static final class Package extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.Package) + PackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Package.newBuilder() to construct. + private Package(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Package() { + name_ = ""; + desiredState_ = 0; + manager_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Package(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Package( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + desiredState_ = rawValue; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + manager_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Package_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Package_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder.class); + } + + /** + * + * + *
+     * Types of package managers that may be used to manage this package.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.Package.Manager} + */ + public enum Manager implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default behavior is ANY.
+       * 
+ * + * MANAGER_UNSPECIFIED = 0; + */ + MANAGER_UNSPECIFIED(0), + /** + * + * + *
+       * Apply this package config using the default system package manager.
+       * 
+ * + * ANY = 1; + */ + ANY(1), + /** + * + * + *
+       * Apply this package config only if Apt is available on the system.
+       * 
+ * + * APT = 2; + */ + APT(2), + /** + * + * + *
+       * Apply this package config only if Yum is available on the system.
+       * 
+ * + * YUM = 3; + */ + YUM(3), + /** + * + * + *
+       * Apply this package config only if Zypper is available on the system.
+       * 
+ * + * ZYPPER = 4; + */ + ZYPPER(4), + /** + * + * + *
+       * Apply this package config only if GooGet is available on the system.
+       * 
+ * + * GOO = 5; + */ + GOO(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The default behavior is ANY.
+       * 
+ * + * MANAGER_UNSPECIFIED = 0; + */ + public static final int MANAGER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Apply this package config using the default system package manager.
+       * 
+ * + * ANY = 1; + */ + public static final int ANY_VALUE = 1; + /** + * + * + *
+       * Apply this package config only if Apt is available on the system.
+       * 
+ * + * APT = 2; + */ + public static final int APT_VALUE = 2; + /** + * + * + *
+       * Apply this package config only if Yum is available on the system.
+       * 
+ * + * YUM = 3; + */ + public static final int YUM_VALUE = 3; + /** + * + * + *
+       * Apply this package config only if Zypper is available on the system.
+       * 
+ * + * ZYPPER = 4; + */ + public static final int ZYPPER_VALUE = 4; + /** + * + * + *
+       * Apply this package config only if GooGet is available on the system.
+       * 
+ * + * GOO = 5; + */ + public static final int GOO_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Manager 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 Manager forNumber(int value) { + switch (value) { + case 0: + return MANAGER_UNSPECIFIED; + case 1: + return ANY; + case 2: + return APT; + case 3: + return YUM; + case 4: + return ZYPPER; + case 5: + return GOO; + 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 Manager findValueByNumber(int number) { + return Manager.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Manager[] VALUES = values(); + + public static Manager 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 Manager(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1beta.Package.Manager) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The name of the package. A package is uniquely identified for conflict
+     * validation by checking the package name and the manager(s) that the
+     * package targets.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of the package. A package is uniquely identified for conflict
+     * validation by checking the package name and the manager(s) that the
+     * package targets.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESIRED_STATE_FIELD_NUMBER = 2; + private int desiredState_; + /** + * + * + *
+     * The desired_state the agent should maintain for this package. The
+     * default is to ensure the package is installed.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return The enum numeric value on the wire for desiredState. + */ + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; + } + /** + * + * + *
+     * The desired_state the agent should maintain for this package. The
+     * default is to ensure the package is installed.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return The desiredState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState result = + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.valueOf(desiredState_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.UNRECOGNIZED + : result; + } + + public static final int MANAGER_FIELD_NUMBER = 3; + private int manager_; + /** + * + * + *
+     * Type of package manager that can be used to install this package.
+     * If a system does not have the package manager, the package is not
+     * installed or removed no error message is returned. By default,
+     * or if you specify `ANY`,
+     * the agent attempts to install and remove this package using the default
+     * package manager. This is useful when creating a policy that applies to
+     * different types of systems.
+     * The default behavior is ANY.
+     * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return The enum numeric value on the wire for manager. + */ + @java.lang.Override + public int getManagerValue() { + return manager_; + } + /** + * + * + *
+     * Type of package manager that can be used to install this package.
+     * If a system does not have the package manager, the package is not
+     * installed or removed no error message is returned. By default,
+     * or if you specify `ANY`,
+     * the agent attempts to install and remove this package using the default
+     * package manager. This is useful when creating a policy that applies to
+     * different types of systems.
+     * The default behavior is ANY.
+     * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return The manager. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager getManager() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager result = + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager.valueOf(manager_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (desiredState_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.DESIRED_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, desiredState_); + } + if (manager_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager.MANAGER_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, manager_); + } + 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 (desiredState_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.DESIRED_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, desiredState_); + } + if (manager_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager.MANAGER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, manager_); + } + 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.v1beta.GuestPolicies.Package)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.Package other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Package) obj; + + if (!getName().equals(other.getName())) return false; + if (desiredState_ != other.desiredState_) return false; + if (manager_ != other.manager_) 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) + DESIRED_STATE_FIELD_NUMBER; + hash = (53 * hash) + desiredState_; + hash = (37 * hash) + MANAGER_FIELD_NUMBER; + hash = (53 * hash) + manager_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package 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.v1beta.GuestPolicies.Package parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package 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.v1beta.GuestPolicies.Package parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package 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.v1beta.GuestPolicies.Package parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package 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.v1beta.GuestPolicies.Package parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package 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.v1beta.GuestPolicies.Package 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; + } + /** + * + * + *
+     * Package is a reference to the software package to be installed or removed.
+     * The agent on the VM instance uses the system package manager to apply the
+     * config.
+     * These are the commands that the agent uses to install or remove
+     * packages.
+     * Apt
+     * install: `apt-get update && apt-get -y install package1 package2 package3`
+     * remove: `apt-get -y remove package1 package2 package3`
+     * Yum
+     * install: `yum -y install package1 package2 package3`
+     * remove: `yum -y remove package1 package2 package3`
+     * Zypper
+     * install: `zypper install package1 package2 package3`
+     * remove: `zypper rm package1 package2`
+     * Googet
+     * install: `googet -noconfirm install package1 package2 package3`
+     * remove: `googet -noconfirm remove package1 package2 package3`
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Package} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.Package) + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Package_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Package_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.Package.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_ = ""; + + desiredState_ = 0; + + manager_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_Package_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Package result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.Package result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.Package(this); + result.name_ = name_; + result.desiredState_ = desiredState_; + result.manager_ = manager_; + 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.v1beta.GuestPolicies.Package) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.Package) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.GuestPolicies.Package other) { + if (other == com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.desiredState_ != 0) { + setDesiredStateValue(other.getDesiredStateValue()); + } + if (other.manager_ != 0) { + setManagerValue(other.getManagerValue()); + } + 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.v1beta.GuestPolicies.Package parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.Package) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The name of the package. A package is uniquely identified for conflict
+       * validation by checking the package name and the manager(s) that the
+       * package targets.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of the package. A package is uniquely identified for conflict
+       * validation by checking the package name and the manager(s) that the
+       * package targets.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of the package. A package is uniquely identified for conflict
+       * validation by checking the package name and the manager(s) that the
+       * package targets.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the package. A package is uniquely identified for conflict
+       * validation by checking the package name and the manager(s) that the
+       * package targets.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the package. A package is uniquely identified for conflict
+       * validation by checking the package name and the manager(s) that the
+       * package targets.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int desiredState_ = 0; + /** + * + * + *
+       * The desired_state the agent should maintain for this package. The
+       * default is to ensure the package is installed.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return The enum numeric value on the wire for desiredState. + */ + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; + } + /** + * + * + *
+       * The desired_state the agent should maintain for this package. The
+       * default is to ensure the package is installed.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @param value The enum numeric value on the wire for desiredState to set. + * @return This builder for chaining. + */ + public Builder setDesiredStateValue(int value) { + + desiredState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The desired_state the agent should maintain for this package. The
+       * default is to ensure the package is installed.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return The desiredState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState result = + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.valueOf(desiredState_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The desired_state the agent should maintain for this package. The
+       * default is to ensure the package is installed.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @param value The desiredState to set. + * @return This builder for chaining. + */ + public Builder setDesiredState( + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState value) { + if (value == null) { + throw new NullPointerException(); + } + + desiredState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The desired_state the agent should maintain for this package. The
+       * default is to ensure the package is installed.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 2; + * + * @return This builder for chaining. + */ + public Builder clearDesiredState() { + + desiredState_ = 0; + onChanged(); + return this; + } + + private int manager_ = 0; + /** + * + * + *
+       * Type of package manager that can be used to install this package.
+       * If a system does not have the package manager, the package is not
+       * installed or removed no error message is returned. By default,
+       * or if you specify `ANY`,
+       * the agent attempts to install and remove this package using the default
+       * package manager. This is useful when creating a policy that applies to
+       * different types of systems.
+       * The default behavior is ANY.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return The enum numeric value on the wire for manager. + */ + @java.lang.Override + public int getManagerValue() { + return manager_; + } + /** + * + * + *
+       * Type of package manager that can be used to install this package.
+       * If a system does not have the package manager, the package is not
+       * installed or removed no error message is returned. By default,
+       * or if you specify `ANY`,
+       * the agent attempts to install and remove this package using the default
+       * package manager. This is useful when creating a policy that applies to
+       * different types of systems.
+       * The default behavior is ANY.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @param value The enum numeric value on the wire for manager to set. + * @return This builder for chaining. + */ + public Builder setManagerValue(int value) { + + manager_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of package manager that can be used to install this package.
+       * If a system does not have the package manager, the package is not
+       * installed or removed no error message is returned. By default,
+       * or if you specify `ANY`,
+       * the agent attempts to install and remove this package using the default
+       * package manager. This is useful when creating a policy that applies to
+       * different types of systems.
+       * The default behavior is ANY.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return The manager. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager getManager() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager result = + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager.valueOf(manager_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of package manager that can be used to install this package.
+       * If a system does not have the package manager, the package is not
+       * installed or removed no error message is returned. By default,
+       * or if you specify `ANY`,
+       * the agent attempts to install and remove this package using the default
+       * package manager. This is useful when creating a policy that applies to
+       * different types of systems.
+       * The default behavior is ANY.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @param value The manager to set. + * @return This builder for chaining. + */ + public Builder setManager( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Manager value) { + if (value == null) { + throw new NullPointerException(); + } + + manager_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of package manager that can be used to install this package.
+       * If a system does not have the package manager, the package is not
+       * installed or removed no error message is returned. By default,
+       * or if you specify `ANY`,
+       * the agent attempts to install and remove this package using the default
+       * package manager. This is useful when creating a policy that applies to
+       * different types of systems.
+       * The default behavior is ANY.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package.Manager manager = 3; + * + * @return This builder for chaining. + */ + public Builder clearManager() { + + manager_ = 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.v1beta.Package) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.Package) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.Package DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.Package(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.Package getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Package parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Package(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.v1beta.GuestPolicies.Package getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AptRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.AptRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Type of archive files in this repository. The default behavior is DEB.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return The enum numeric value on the wire for archiveType. + */ + int getArchiveTypeValue(); + /** + * + * + *
+     * Type of archive files in this repository. The default behavior is DEB.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return The archiveType. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType getArchiveType(); + + /** + * + * + *
+     * Required. URI for this repository.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * Required. URI for this repository.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+     * Required. Distribution of this repository.
+     * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The distribution. + */ + java.lang.String getDistribution(); + /** + * + * + *
+     * Required. Distribution of this repository.
+     * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for distribution. + */ + com.google.protobuf.ByteString getDistributionBytes(); + + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the components. + */ + java.util.List getComponentsList(); + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of components. + */ + int getComponentsCount(); + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + java.lang.String getComponents(int index); + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + com.google.protobuf.ByteString getComponentsBytes(int index); + + /** + * + * + *
+     * URI of the key file for this repository. The agent maintains
+     * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+     * all the keys in any applied guest policy.
+     * 
+ * + * string gpg_key = 5; + * + * @return The gpgKey. + */ + java.lang.String getGpgKey(); + /** + * + * + *
+     * URI of the key file for this repository. The agent maintains
+     * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+     * all the keys in any applied guest policy.
+     * 
+ * + * string gpg_key = 5; + * + * @return The bytes for gpgKey. + */ + com.google.protobuf.ByteString getGpgKeyBytes(); + } + /** + * + * + *
+   * Represents a single Apt package repository. This repository is added to
+   * a repo file that is stored at
+   * `/etc/apt/sources.list.d/google_osconfig.list`.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.AptRepository} + */ + public static final class AptRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.AptRepository) + AptRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use AptRepository.newBuilder() to construct. + private AptRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AptRepository() { + archiveType_ = 0; + uri_ = ""; + distribution_ = ""; + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + gpgKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AptRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AptRepository( + 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(); + + archiveType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + distribution_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + components_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + components_.add(s); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + gpgKey_ = 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)) { + components_ = components_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_AptRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_AptRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder.class); + } + + /** + * + * + *
+     * Type of archive.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.AptRepository.ArchiveType} + */ + public enum ArchiveType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + ARCHIVE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * DEB indicates that the archive contains binary files.
+       * 
+ * + * DEB = 1; + */ + DEB(1), + /** + * + * + *
+       * DEB_SRC indicates that the archive contains source files.
+       * 
+ * + * DEB_SRC = 2; + */ + DEB_SRC(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + public static final int ARCHIVE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * DEB indicates that the archive contains binary files.
+       * 
+ * + * DEB = 1; + */ + public static final int DEB_VALUE = 1; + /** + * + * + *
+       * DEB_SRC indicates that the archive contains source files.
+       * 
+ * + * DEB_SRC = 2; + */ + public static final int DEB_SRC_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 ArchiveType 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 ArchiveType forNumber(int value) { + switch (value) { + case 0: + return ARCHIVE_TYPE_UNSPECIFIED; + case 1: + return DEB; + case 2: + return DEB_SRC; + 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 ArchiveType findValueByNumber(int number) { + return ArchiveType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ArchiveType[] VALUES = values(); + + public static ArchiveType 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 ArchiveType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1beta.AptRepository.ArchiveType) + } + + public static final int ARCHIVE_TYPE_FIELD_NUMBER = 1; + private int archiveType_; + /** + * + * + *
+     * Type of archive files in this repository. The default behavior is DEB.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return The enum numeric value on the wire for archiveType. + */ + @java.lang.Override + public int getArchiveTypeValue() { + return archiveType_; + } + /** + * + * + *
+     * Type of archive files in this repository. The default behavior is DEB.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return The archiveType. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType + getArchiveType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType result = + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType.valueOf( + archiveType_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType.UNRECOGNIZED + : result; + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+     * Required. URI for this repository.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * Required. URI for this repository.
+     * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISTRIBUTION_FIELD_NUMBER = 3; + private volatile java.lang.Object distribution_; + /** + * + * + *
+     * Required. Distribution of this repository.
+     * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The distribution. + */ + @java.lang.Override + public java.lang.String getDistribution() { + java.lang.Object ref = distribution_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + distribution_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Distribution of this repository.
+     * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for distribution. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDistributionBytes() { + java.lang.Object ref = distribution_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + distribution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPONENTS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList components_; + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_; + } + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+     * Required. List of components for this repository. Must contain at least one item.
+     * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + + public static final int GPG_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object gpgKey_; + /** + * + * + *
+     * URI of the key file for this repository. The agent maintains
+     * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+     * all the keys in any applied guest policy.
+     * 
+ * + * string gpg_key = 5; + * + * @return The gpgKey. + */ + @java.lang.Override + public java.lang.String getGpgKey() { + java.lang.Object ref = gpgKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gpgKey_ = s; + return s; + } + } + /** + * + * + *
+     * URI of the key file for this repository. The agent maintains
+     * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+     * all the keys in any applied guest policy.
+     * 
+ * + * string gpg_key = 5; + * + * @return The bytes for gpgKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGpgKeyBytes() { + java.lang.Object ref = gpgKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gpgKey_ = 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 (archiveType_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType + .ARCHIVE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, archiveType_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (!getDistributionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, distribution_); + } + for (int i = 0; i < components_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, components_.getRaw(i)); + } + if (!getGpgKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, gpgKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (archiveType_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType + .ARCHIVE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, archiveType_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (!getDistributionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, distribution_); + } + { + int dataSize = 0; + for (int i = 0; i < components_.size(); i++) { + dataSize += computeStringSizeNoTag(components_.getRaw(i)); + } + size += dataSize; + size += 1 * getComponentsList().size(); + } + if (!getGpgKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, gpgKey_); + } + 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.v1beta.GuestPolicies.AptRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) obj; + + if (archiveType_ != other.archiveType_) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDistribution().equals(other.getDistribution())) return false; + if (!getComponentsList().equals(other.getComponentsList())) return false; + if (!getGpgKey().equals(other.getGpgKey())) 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) + ARCHIVE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + archiveType_; + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getDistribution().hashCode(); + if (getComponentsCount() > 0) { + hash = (37 * hash) + COMPONENTS_FIELD_NUMBER; + hash = (53 * hash) + getComponentsList().hashCode(); + } + hash = (37 * hash) + GPG_KEY_FIELD_NUMBER; + hash = (53 * hash) + getGpgKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository 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.v1beta.GuestPolicies.AptRepository parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository 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.v1beta.GuestPolicies.AptRepository parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository 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.v1beta.GuestPolicies.AptRepository parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository 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.v1beta.GuestPolicies.AptRepository parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository 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.v1beta.GuestPolicies.AptRepository 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 single Apt package repository. This repository is added to
+     * a repo file that is stored at
+     * `/etc/apt/sources.list.d/google_osconfig.list`.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.AptRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.AptRepository) + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_AptRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_AptRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.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(); + archiveType_ = 0; + + uri_ = ""; + + distribution_ = ""; + + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + gpgKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_AptRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository(this); + int from_bitField0_ = bitField0_; + result.archiveType_ = archiveType_; + result.uri_ = uri_; + result.distribution_ = distribution_; + if (((bitField0_ & 0x00000001) != 0)) { + components_ = components_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.components_ = components_; + result.gpgKey_ = gpgKey_; + 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.v1beta.GuestPolicies.AptRepository) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance()) + return this; + if (other.archiveType_ != 0) { + setArchiveTypeValue(other.getArchiveTypeValue()); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getDistribution().isEmpty()) { + distribution_ = other.distribution_; + onChanged(); + } + if (!other.components_.isEmpty()) { + if (components_.isEmpty()) { + components_ = other.components_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureComponentsIsMutable(); + components_.addAll(other.components_); + } + onChanged(); + } + if (!other.getGpgKey().isEmpty()) { + gpgKey_ = other.gpgKey_; + 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.v1beta.GuestPolicies.AptRepository parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int archiveType_ = 0; + /** + * + * + *
+       * Type of archive files in this repository. The default behavior is DEB.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return The enum numeric value on the wire for archiveType. + */ + @java.lang.Override + public int getArchiveTypeValue() { + return archiveType_; + } + /** + * + * + *
+       * Type of archive files in this repository. The default behavior is DEB.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @param value The enum numeric value on the wire for archiveType to set. + * @return This builder for chaining. + */ + public Builder setArchiveTypeValue(int value) { + + archiveType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Type of archive files in this repository. The default behavior is DEB.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return The archiveType. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType + getArchiveType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType result = + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType.valueOf( + archiveType_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Type of archive files in this repository. The default behavior is DEB.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @param value The archiveType to set. + * @return This builder for chaining. + */ + public Builder setArchiveType( + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.ArchiveType value) { + if (value == null) { + throw new NullPointerException(); + } + + archiveType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Type of archive files in this repository. The default behavior is DEB.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository.ArchiveType archive_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearArchiveType() { + + archiveType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * Required. URI for this repository.
+       * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. URI for this repository.
+       * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. URI for this repository.
+       * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. URI for this repository.
+       * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. URI for this repository.
+       * 
+ * + * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object distribution_ = ""; + /** + * + * + *
+       * Required. Distribution of this repository.
+       * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The distribution. + */ + public java.lang.String getDistribution() { + java.lang.Object ref = distribution_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + distribution_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Distribution of this repository.
+       * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for distribution. + */ + public com.google.protobuf.ByteString getDistributionBytes() { + java.lang.Object ref = distribution_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + distribution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Distribution of this repository.
+       * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The distribution to set. + * @return This builder for chaining. + */ + public Builder setDistribution(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + distribution_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Distribution of this repository.
+       * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDistribution() { + + distribution_ = getDefaultInstance().getDistribution(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Distribution of this repository.
+       * 
+ * + * string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for distribution to set. + * @return This builder for chaining. + */ + public Builder setDistributionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + distribution_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList components_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureComponentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + components_ = new com.google.protobuf.LazyStringArrayList(components_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the components. + */ + public com.google.protobuf.ProtocolStringList getComponentsList() { + return components_.getUnmodifiableView(); + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of components. + */ + public int getComponentsCount() { + return components_.size(); + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The components at the given index. + */ + public java.lang.String getComponents(int index) { + return components_.get(index); + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the components at the given index. + */ + public com.google.protobuf.ByteString getComponentsBytes(int index) { + return components_.getByteString(index); + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The components to set. + * @return This builder for chaining. + */ + public Builder setComponents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The components to add. + * @return This builder for chaining. + */ + public Builder addComponents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The components to add. + * @return This builder for chaining. + */ + public Builder addAllComponents(java.lang.Iterable values) { + ensureComponentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, components_); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearComponents() { + components_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. List of components for this repository. Must contain at least one item.
+       * 
+ * + * repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the components to add. + * @return This builder for chaining. + */ + public Builder addComponentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureComponentsIsMutable(); + components_.add(value); + onChanged(); + return this; + } + + private java.lang.Object gpgKey_ = ""; + /** + * + * + *
+       * URI of the key file for this repository. The agent maintains
+       * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+       * all the keys in any applied guest policy.
+       * 
+ * + * string gpg_key = 5; + * + * @return The gpgKey. + */ + public java.lang.String getGpgKey() { + java.lang.Object ref = gpgKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gpgKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * URI of the key file for this repository. The agent maintains
+       * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+       * all the keys in any applied guest policy.
+       * 
+ * + * string gpg_key = 5; + * + * @return The bytes for gpgKey. + */ + public com.google.protobuf.ByteString getGpgKeyBytes() { + java.lang.Object ref = gpgKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gpgKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * URI of the key file for this repository. The agent maintains
+       * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+       * all the keys in any applied guest policy.
+       * 
+ * + * string gpg_key = 5; + * + * @param value The gpgKey to set. + * @return This builder for chaining. + */ + public Builder setGpgKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gpgKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * URI of the key file for this repository. The agent maintains
+       * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+       * all the keys in any applied guest policy.
+       * 
+ * + * string gpg_key = 5; + * + * @return This builder for chaining. + */ + public Builder clearGpgKey() { + + gpgKey_ = getDefaultInstance().getGpgKey(); + onChanged(); + return this; + } + /** + * + * + *
+       * URI of the key file for this repository. The agent maintains
+       * a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing
+       * all the keys in any applied guest policy.
+       * 
+ * + * string gpg_key = 5; + * + * @param value The bytes for gpgKey to set. + * @return This builder for chaining. + */ + public Builder setGpgKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gpgKey_ = 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.v1beta.AptRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.AptRepository) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AptRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AptRepository(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.v1beta.GuestPolicies.AptRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YumRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.YumRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the Yum config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the Yum config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + java.lang.String getBaseUrl(); + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + com.google.protobuf.ByteString getBaseUrlBytes(); + + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + java.util.List getGpgKeysList(); + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + int getGpgKeysCount(); + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + java.lang.String getGpgKeys(int index); + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + com.google.protobuf.ByteString getGpgKeysBytes(int index); + } + /** + * + * + *
+   * Represents a single Yum package repository. This repository is added to a
+   * repo file that is stored at `/etc/yum.repos.d/google_osconfig.repo`.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.YumRepository} + */ + public static final class YumRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.YumRepository) + YumRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use YumRepository.newBuilder() to construct. + private YumRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YumRepository() { + id_ = ""; + displayName_ = ""; + baseUrl_ = ""; + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YumRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private YumRepository( + 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(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseUrl_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + gpgKeys_.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)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_YumRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_YumRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the Yum config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the Yum config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_URL_FIELD_NUMBER = 3; + private volatile java.lang.Object baseUrl_; + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + @java.lang.Override + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPG_KEYS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList gpgKeys_; + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_; + } + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseUrl_); + } + for (int i = 0; i < gpgKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, gpgKeys_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseUrl_); + } + { + int dataSize = 0; + for (int i = 0; i < gpgKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(gpgKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getGpgKeysList().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.v1beta.GuestPolicies.YumRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getBaseUrl().equals(other.getBaseUrl())) return false; + if (!getGpgKeysList().equals(other.getGpgKeysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + BASE_URL_FIELD_NUMBER; + hash = (53 * hash) + getBaseUrl().hashCode(); + if (getGpgKeysCount() > 0) { + hash = (37 * hash) + GPG_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getGpgKeysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository 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.v1beta.GuestPolicies.YumRepository parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository 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.v1beta.GuestPolicies.YumRepository parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository 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.v1beta.GuestPolicies.YumRepository parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository 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.v1beta.GuestPolicies.YumRepository parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository 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.v1beta.GuestPolicies.YumRepository 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 single Yum package repository. This repository is added to a
+     * repo file that is stored at `/etc/yum.repos.d/google_osconfig.repo`.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.YumRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.YumRepository) + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_YumRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_YumRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.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(); + id_ = ""; + + displayName_ = ""; + + baseUrl_ = ""; + + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_YumRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.displayName_ = displayName_; + result.baseUrl_ = baseUrl_; + if (((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.gpgKeys_ = gpgKeys_; + 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.v1beta.GuestPolicies.YumRepository) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getBaseUrl().isEmpty()) { + baseUrl_ = other.baseUrl_; + onChanged(); + } + if (!other.gpgKeys_.isEmpty()) { + if (gpgKeys_.isEmpty()) { + gpgKeys_ = other.gpgKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGpgKeysIsMutable(); + gpgKeys_.addAll(other.gpgKeys_); + } + 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.v1beta.GuestPolicies.YumRepository parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the Yum config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the Yum config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the Yum config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the Yum config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the Yum config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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; + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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 baseUrl_ = ""; + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBaseUrl() { + + baseUrl_ = getDefaultInstance().getBaseUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList gpgKeys_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureGpgKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(gpgKeys_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_.getUnmodifiableView(); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.getByteString(index); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index to set the value at. + * @param value The gpgKeys to set. + * @return This builder for chaining. + */ + public Builder setGpgKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param values The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addAllGpgKeys(java.lang.Iterable values) { + ensureGpgKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gpgKeys_); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @return This builder for chaining. + */ + public Builder clearGpgKeys() { + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The bytes of the gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGpgKeysIsMutable(); + gpgKeys_.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.v1beta.YumRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.YumRepository) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YumRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new YumRepository(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.v1beta.GuestPolicies.YumRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ZypperRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ZypperRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the zypper config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the zypper config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + java.lang.String getBaseUrl(); + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + com.google.protobuf.ByteString getBaseUrlBytes(); + + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + java.util.List getGpgKeysList(); + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + int getGpgKeysCount(); + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + java.lang.String getGpgKeys(int index); + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + com.google.protobuf.ByteString getGpgKeysBytes(int index); + } + /** + * + * + *
+   * Represents a single Zypper package repository. This repository is added to a
+   * repo file that is stored at `/etc/zypp/repos.d/google_osconfig.repo`.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ZypperRepository} + */ + public static final class ZypperRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.ZypperRepository) + ZypperRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ZypperRepository.newBuilder() to construct. + private ZypperRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ZypperRepository() { + id_ = ""; + displayName_ = ""; + baseUrl_ = ""; + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ZypperRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ZypperRepository( + 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(); + + id_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + baseUrl_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + gpgKeys_.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)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ZypperRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ZypperRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the zypper config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * Required. A one word, unique name for this repository. This is
+     * the `repo id` in the zypper config file and also the `display_name` if
+     * `display_name` is omitted. This id is also used as the unique identifier
+     * when checking for guest policy conflicts.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * The display name of the repository.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASE_URL_FIELD_NUMBER = 3; + private volatile java.lang.Object baseUrl_; + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + @java.lang.Override + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The location of the repository directory.
+     * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GPG_KEYS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList gpgKeys_; + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_; + } + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+     * URIs of GPG keys.
+     * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, baseUrl_); + } + for (int i = 0; i < gpgKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, gpgKeys_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getBaseUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, baseUrl_); + } + { + int dataSize = 0; + for (int i = 0; i < gpgKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(gpgKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getGpgKeysList().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.v1beta.GuestPolicies.ZypperRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) obj; + + if (!getId().equals(other.getId())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getBaseUrl().equals(other.getBaseUrl())) return false; + if (!getGpgKeysList().equals(other.getGpgKeysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + BASE_URL_FIELD_NUMBER; + hash = (53 * hash) + getBaseUrl().hashCode(); + if (getGpgKeysCount() > 0) { + hash = (37 * hash) + GPG_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getGpgKeysList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository 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.v1beta.GuestPolicies.ZypperRepository parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository 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.v1beta.GuestPolicies.ZypperRepository parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository 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.v1beta.GuestPolicies.ZypperRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + 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.v1beta.GuestPolicies.ZypperRepository parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository 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.v1beta.GuestPolicies.ZypperRepository 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 single Zypper package repository. This repository is added to a
+     * repo file that is stored at `/etc/zypp/repos.d/google_osconfig.repo`.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ZypperRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ZypperRepository) + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ZypperRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ZypperRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.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(); + id_ = ""; + + displayName_ = ""; + + baseUrl_ = ""; + + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ZypperRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + result.displayName_ = displayName_; + result.baseUrl_ = baseUrl_; + if (((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = gpgKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.gpgKeys_ = gpgKeys_; + 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.v1beta.GuestPolicies.ZypperRepository) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getBaseUrl().isEmpty()) { + baseUrl_ = other.baseUrl_; + onChanged(); + } + if (!other.gpgKeys_.isEmpty()) { + if (gpgKeys_.isEmpty()) { + gpgKeys_ = other.gpgKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGpgKeysIsMutable(); + gpgKeys_.addAll(other.gpgKeys_); + } + 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.v1beta.GuestPolicies.ZypperRepository parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the zypper config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the zypper config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the zypper config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the zypper config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A one word, unique name for this repository. This is
+       * the `repo id` in the zypper config file and also the `display_name` if
+       * `display_name` is omitted. This id is also used as the unique identifier
+       * when checking for guest policy conflicts.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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; + } + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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; + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The display name of the repository.
+       * 
+ * + * string display_name = 2; + * + * @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 baseUrl_ = ""; + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The baseUrl. + */ + public java.lang.String getBaseUrl() { + java.lang.Object ref = baseUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for baseUrl. + */ + public com.google.protobuf.ByteString getBaseUrlBytes() { + java.lang.Object ref = baseUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBaseUrl() { + + baseUrl_ = getDefaultInstance().getBaseUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The location of the repository directory.
+       * 
+ * + * string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for baseUrl to set. + * @return This builder for chaining. + */ + public Builder setBaseUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList gpgKeys_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureGpgKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + gpgKeys_ = new com.google.protobuf.LazyStringArrayList(gpgKeys_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @return A list containing the gpgKeys. + */ + public com.google.protobuf.ProtocolStringList getGpgKeysList() { + return gpgKeys_.getUnmodifiableView(); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @return The count of gpgKeys. + */ + public int getGpgKeysCount() { + return gpgKeys_.size(); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the element to return. + * @return The gpgKeys at the given index. + */ + public java.lang.String getGpgKeys(int index) { + return gpgKeys_.get(index); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index of the value to return. + * @return The bytes of the gpgKeys at the given index. + */ + public com.google.protobuf.ByteString getGpgKeysBytes(int index) { + return gpgKeys_.getByteString(index); + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param index The index to set the value at. + * @param value The gpgKeys to set. + * @return This builder for chaining. + */ + public Builder setGpgKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGpgKeysIsMutable(); + gpgKeys_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param values The gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addAllGpgKeys(java.lang.Iterable values) { + ensureGpgKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gpgKeys_); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @return This builder for chaining. + */ + public Builder clearGpgKeys() { + gpgKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * URIs of GPG keys.
+       * 
+ * + * repeated string gpg_keys = 4; + * + * @param value The bytes of the gpgKeys to add. + * @return This builder for chaining. + */ + public Builder addGpgKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGpgKeysIsMutable(); + gpgKeys_.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.v1beta.ZypperRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ZypperRepository) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ZypperRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ZypperRepository(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.v1beta.GuestPolicies.ZypperRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GooRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.GooRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the repository.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name of the repository.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Required. The url of the repository.
+     * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + java.lang.String getUrl(); + /** + * + * + *
+     * Required. The url of the repository.
+     * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); + } + /** + * + * + *
+   * Represents a Goo package repository. These is added to a repo file
+   * that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GooRepository} + */ + public static final class GooRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.GooRepository) + GooRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use GooRepository.newBuilder() to construct. + private GooRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GooRepository() { + name_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GooRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GooRepository( + 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(); + + url_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GooRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GooRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The name of the repository.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of the repository.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + private volatile java.lang.Object url_; + /** + * + * + *
+     * Required. The url of the repository.
+     * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The url of the repository.
+     * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = 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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + 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 (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + 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.v1beta.GuestPolicies.GooRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUrl().equals(other.getUrl())) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository 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.v1beta.GuestPolicies.GooRepository parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository 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.v1beta.GuestPolicies.GooRepository parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository 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.v1beta.GuestPolicies.GooRepository parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository 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.v1beta.GuestPolicies.GooRepository parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository 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.v1beta.GuestPolicies.GooRepository 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 Goo package repository. These is added to a repo file
+     * that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GooRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GooRepository) + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GooRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GooRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.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_ = ""; + + url_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GooRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository(this); + result.name_ = name_; + result.url_ = url_; + 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.v1beta.GuestPolicies.GooRepository) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + 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.v1beta.GuestPolicies.GooRepository parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The name of the repository.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of the repository.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of the repository.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the repository.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the repository.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * + * + *
+       * Required. The url of the repository.
+       * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The url of the repository.
+       * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The url of the repository.
+       * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The url of the repository.
+       * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The url of the repository.
+       * 
+ * + * string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = 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.v1beta.GooRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GooRepository) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GooRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GooRepository(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.v1beta.GuestPolicies.GooRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PackageRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.PackageRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An Apt Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + * + * @return Whether the apt field is set. + */ + boolean hasApt(); + /** + * + * + *
+     * An Apt Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + * + * @return The apt. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository getApt(); + /** + * + * + *
+     * An Apt Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder getAptOrBuilder(); + + /** + * + * + *
+     * A Yum Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + * + * @return Whether the yum field is set. + */ + boolean hasYum(); + /** + * + * + *
+     * A Yum Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + * + * @return The yum. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository getYum(); + /** + * + * + *
+     * A Yum Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder getYumOrBuilder(); + + /** + * + * + *
+     * A Zypper Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + * + * @return Whether the zypper field is set. + */ + boolean hasZypper(); + /** + * + * + *
+     * A Zypper Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + * + * @return The zypper. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository getZypper(); + /** + * + * + *
+     * A Zypper Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder getZypperOrBuilder(); + + /** + * + * + *
+     * A Goo Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + * + * @return Whether the goo field is set. + */ + boolean hasGoo(); + /** + * + * + *
+     * A Goo Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + * + * @return The goo. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository getGoo(); + /** + * + * + *
+     * A Goo Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder getGooOrBuilder(); + + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.RepositoryCase + getRepositoryCase(); + } + /** + * + * + *
+   * A package repository.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.PackageRepository} + */ + public static final class PackageRepository extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.PackageRepository) + PackageRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PackageRepository.newBuilder() to construct. + private PackageRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PackageRepository() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PackageRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PackageRepository( + 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.v1beta.GuestPolicies.AptRepository.Builder subBuilder = + null; + if (repositoryCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 1; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder subBuilder = + null; + if (repositoryCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder subBuilder = + null; + if (repositoryCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) + repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) + repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder subBuilder = + null; + if (repositoryCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_) + .toBuilder(); + } + repository_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_); + repository_ = subBuilder.buildPartial(); + } + repositoryCase_ = 4; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_PackageRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_PackageRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder.class); + } + + private int repositoryCase_ = 0; + private java.lang.Object repository_; + + public enum RepositoryCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + APT(1), + YUM(2), + ZYPPER(3), + GOO(4), + REPOSITORY_NOT_SET(0); + private final int value; + + private RepositoryCase(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 RepositoryCase valueOf(int value) { + return forNumber(value); + } + + public static RepositoryCase forNumber(int value) { + switch (value) { + case 1: + return APT; + case 2: + return YUM; + case 3: + return ZYPPER; + case 4: + return GOO; + case 0: + return REPOSITORY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RepositoryCase getRepositoryCase() { + return RepositoryCase.forNumber(repositoryCase_); + } + + public static final int APT_FIELD_NUMBER = 1; + /** + * + * + *
+     * An Apt Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return repositoryCase_ == 1; + } + /** + * + * + *
+     * An Apt Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository getApt() { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } + /** + * + * + *
+     * An Apt Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder getAptOrBuilder() { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } + + public static final int YUM_FIELD_NUMBER = 2; + /** + * + * + *
+     * A Yum Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return repositoryCase_ == 2; + } + /** + * + * + *
+     * A Yum Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository getYum() { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } + /** + * + * + *
+     * A Yum Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder getYumOrBuilder() { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } + + public static final int ZYPPER_FIELD_NUMBER = 3; + /** + * + * + *
+     * A Zypper Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return repositoryCase_ == 3; + } + /** + * + * + *
+     * A Zypper Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository getZypper() { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.getDefaultInstance(); + } + /** + * + * + *
+     * A Zypper Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder + getZypperOrBuilder() { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.getDefaultInstance(); + } + + public static final int GOO_FIELD_NUMBER = 4; + /** + * + * + *
+     * A Goo Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + * + * @return Whether the goo field is set. + */ + @java.lang.Override + public boolean hasGoo() { + return repositoryCase_ == 4; + } + /** + * + * + *
+     * A Goo Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + * + * @return The goo. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository getGoo() { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } + /** + * + * + *
+     * A Goo Repository.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder getGooOrBuilder() { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (repositoryCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_); + } + if (repositoryCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_); + } + if (repositoryCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_); + } + if (repositoryCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repositoryCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_); + } + if (repositoryCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_); + } + if (repositoryCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_); + } + if (repositoryCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_); + } + 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.v1beta.GuestPolicies.PackageRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository) obj; + + if (!getRepositoryCase().equals(other.getRepositoryCase())) return false; + switch (repositoryCase_) { + case 1: + if (!getApt().equals(other.getApt())) return false; + break; + case 2: + if (!getYum().equals(other.getYum())) return false; + break; + case 3: + if (!getZypper().equals(other.getZypper())) return false; + break; + case 4: + if (!getGoo().equals(other.getGoo())) 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 (repositoryCase_) { + case 1: + hash = (37 * hash) + APT_FIELD_NUMBER; + hash = (53 * hash) + getApt().hashCode(); + break; + case 2: + hash = (37 * hash) + YUM_FIELD_NUMBER; + hash = (53 * hash) + getYum().hashCode(); + break; + case 3: + hash = (37 * hash) + ZYPPER_FIELD_NUMBER; + hash = (53 * hash) + getZypper().hashCode(); + break; + case 4: + hash = (37 * hash) + GOO_FIELD_NUMBER; + hash = (53 * hash) + getGoo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository 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.v1beta.GuestPolicies.PackageRepository parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository 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.v1beta.GuestPolicies.PackageRepository parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository 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.v1beta.GuestPolicies.PackageRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + 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.v1beta.GuestPolicies.PackageRepository parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository 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.v1beta.GuestPolicies.PackageRepository 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 package repository.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.PackageRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PackageRepository) + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_PackageRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_PackageRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.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(); + repositoryCase_ = 0; + repository_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_PackageRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository(this); + if (repositoryCase_ == 1) { + if (aptBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = aptBuilder_.build(); + } + } + if (repositoryCase_ == 2) { + if (yumBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = yumBuilder_.build(); + } + } + if (repositoryCase_ == 3) { + if (zypperBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = zypperBuilder_.build(); + } + } + if (repositoryCase_ == 4) { + if (gooBuilder_ == null) { + result.repository_ = repository_; + } else { + result.repository_ = gooBuilder_.build(); + } + } + result.repositoryCase_ = repositoryCase_; + 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.v1beta.GuestPolicies.PackageRepository) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + .getDefaultInstance()) return this; + switch (other.getRepositoryCase()) { + case APT: + { + mergeApt(other.getApt()); + break; + } + case YUM: + { + mergeYum(other.getYum()); + break; + } + case ZYPPER: + { + mergeZypper(other.getZypper()); + break; + } + case GOO: + { + mergeGoo(other.getGoo()); + break; + } + case REPOSITORY_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.v1beta.GuestPolicies.PackageRepository parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int repositoryCase_ = 0; + private java.lang.Object repository_; + + public RepositoryCase getRepositoryCase() { + return RepositoryCase.forNumber(repositoryCase_); + } + + public Builder clearRepository() { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder> + aptBuilder_; + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return repositoryCase_ == 1; + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository getApt() { + if (aptBuilder_ == null) { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 1) { + return aptBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + public Builder setApt(com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository value) { + if (aptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + aptBuilder_.setMessage(value); + } + repositoryCase_ = 1; + return this; + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + public Builder setApt( + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder builderForValue) { + if (aptBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + aptBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 1; + return this; + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + public Builder mergeApt(com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository value) { + if (aptBuilder_ == null) { + if (repositoryCase_ == 1 + && repository_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository + .getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 1) { + aptBuilder_.mergeFrom(value); + } + aptBuilder_.setMessage(value); + } + repositoryCase_ = 1; + return this; + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + public Builder clearApt() { + if (aptBuilder_ == null) { + if (repositoryCase_ == 1) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 1) { + repositoryCase_ = 0; + repository_ = null; + } + aptBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder getAptBuilder() { + return getAptFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder + getAptOrBuilder() { + if ((repositoryCase_ == 1) && (aptBuilder_ != null)) { + return aptBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * An Apt Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptRepository apt = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder> + getAptFieldBuilder() { + if (aptBuilder_ == null) { + if (!(repositoryCase_ == 1)) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.getDefaultInstance(); + } + aptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.AptRepository) repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 1; + onChanged(); + ; + return aptBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder> + yumBuilder_; + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return repositoryCase_ == 2; + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository getYum() { + if (yumBuilder_ == null) { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 2) { + return yumBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + public Builder setYum(com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository value) { + if (yumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + yumBuilder_.setMessage(value); + } + repositoryCase_ = 2; + return this; + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + public Builder setYum( + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder builderForValue) { + if (yumBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + yumBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 2; + return this; + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + public Builder mergeYum(com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository value) { + if (yumBuilder_ == null) { + if (repositoryCase_ == 2 + && repository_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository + .getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 2) { + yumBuilder_.mergeFrom(value); + } + yumBuilder_.setMessage(value); + } + repositoryCase_ = 2; + return this; + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + public Builder clearYum() { + if (yumBuilder_ == null) { + if (repositoryCase_ == 2) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 2) { + repositoryCase_ = 0; + repository_ = null; + } + yumBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder getYumBuilder() { + return getYumFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder + getYumOrBuilder() { + if ((repositoryCase_ == 2) && (yumBuilder_ != null)) { + return yumBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Yum Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumRepository yum = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder> + getYumFieldBuilder() { + if (yumBuilder_ == null) { + if (!(repositoryCase_ == 2)) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.getDefaultInstance(); + } + yumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.YumRepository) repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 2; + onChanged(); + ; + return yumBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder> + zypperBuilder_; + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return repositoryCase_ == 3; + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository getZypper() { + if (zypperBuilder_ == null) { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + .getDefaultInstance(); + } else { + if (repositoryCase_ == 3) { + return zypperBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + public Builder setZypper( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository value) { + if (zypperBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + zypperBuilder_.setMessage(value); + } + repositoryCase_ = 3; + return this; + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + public Builder setZypper( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder builderForValue) { + if (zypperBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + zypperBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 3; + return this; + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + public Builder mergeZypper( + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository value) { + if (zypperBuilder_ == null) { + if (repositoryCase_ == 3 + && repository_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + .getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) + repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 3) { + zypperBuilder_.mergeFrom(value); + } + zypperBuilder_.setMessage(value); + } + repositoryCase_ = 3; + return this; + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + public Builder clearZypper() { + if (zypperBuilder_ == null) { + if (repositoryCase_ == 3) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 3) { + repositoryCase_ = 0; + repository_ = null; + } + zypperBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder + getZypperBuilder() { + return getZypperFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder + getZypperOrBuilder() { + if ((repositoryCase_ == 3) && (zypperBuilder_ != null)) { + return zypperBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + .getDefaultInstance(); + } + } + /** + * + * + *
+       * A Zypper Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperRepository zypper = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder> + getZypperFieldBuilder() { + if (zypperBuilder_ == null) { + if (!(repositoryCase_ == 3)) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository + .getDefaultInstance(); + } + zypperBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.ZypperRepository) repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 3; + onChanged(); + ; + return zypperBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder> + gooBuilder_; + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + * + * @return Whether the goo field is set. + */ + @java.lang.Override + public boolean hasGoo() { + return repositoryCase_ == 4; + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + * + * @return The goo. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository getGoo() { + if (gooBuilder_ == null) { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } else { + if (repositoryCase_ == 4) { + return gooBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + public Builder setGoo(com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository value) { + if (gooBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repository_ = value; + onChanged(); + } else { + gooBuilder_.setMessage(value); + } + repositoryCase_ = 4; + return this; + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + public Builder setGoo( + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder builderForValue) { + if (gooBuilder_ == null) { + repository_ = builderForValue.build(); + onChanged(); + } else { + gooBuilder_.setMessage(builderForValue.build()); + } + repositoryCase_ = 4; + return this; + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + public Builder mergeGoo(com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository value) { + if (gooBuilder_ == null) { + if (repositoryCase_ == 4 + && repository_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository + .getDefaultInstance()) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_) + .mergeFrom(value) + .buildPartial(); + } else { + repository_ = value; + } + onChanged(); + } else { + if (repositoryCase_ == 4) { + gooBuilder_.mergeFrom(value); + } + gooBuilder_.setMessage(value); + } + repositoryCase_ = 4; + return this; + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + public Builder clearGoo() { + if (gooBuilder_ == null) { + if (repositoryCase_ == 4) { + repositoryCase_ = 0; + repository_ = null; + onChanged(); + } + } else { + if (repositoryCase_ == 4) { + repositoryCase_ = 0; + repository_ = null; + } + gooBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder getGooBuilder() { + return getGooFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder + getGooOrBuilder() { + if ((repositoryCase_ == 4) && (gooBuilder_ != null)) { + return gooBuilder_.getMessageOrBuilder(); + } else { + if (repositoryCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Goo Repository.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooRepository goo = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder> + getGooFieldBuilder() { + if (gooBuilder_ == null) { + if (!(repositoryCase_ == 4)) { + repository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.getDefaultInstance(); + } + gooBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepositoryOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.GooRepository) repository_, + getParentForChildren(), + isClean()); + repository_ = null; + } + repositoryCase_ = 4; + onChanged(); + ; + return gooBuilder_; + } + + @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.v1beta.PackageRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PackageRepository) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PackageRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PackageRepository(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.v1beta.GuestPolicies.PackageRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SoftwareRecipeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Unique identifier for the recipe. Only one recipe with a given name is
+     * installed on an instance.
+     * Names are also used to identify resources which helps to determine whether
+     * guest policies have conflicts. This means that requests to create multiple
+     * recipes with the same name and version are rejected since they
+     * could potentially have conflicting assignments.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. Unique identifier for the recipe. Only one recipe with a given name is
+     * installed on an instance.
+     * Names are also used to identify resources which helps to determine whether
+     * guest policies have conflicts. This means that requests to create multiple
+     * recipes with the same name and version are rejected since they
+     * could potentially have conflicting assignments.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The version of this software recipe. Version can be up to 4 period
+     * separated numbers (e.g. 12.34.56.78).
+     * 
+ * + * string version = 2; + * + * @return The version. + */ + java.lang.String getVersion(); + /** + * + * + *
+     * The version of this software recipe. Version can be up to 4 period
+     * separated numbers (e.g. 12.34.56.78).
+     * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + java.util.List + getArtifactsList(); + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact getArtifacts(int index); + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + int getArtifactsCount(); + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> + getArtifactsOrBuilderList(); + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder + getArtifactsOrBuilder(int index); + + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + java.util.List + getInstallStepsList(); + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getInstallSteps(int index); + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + int getInstallStepsCount(); + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getInstallStepsOrBuilderList(); + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder + getInstallStepsOrBuilder(int index); + + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + java.util.List + getUpdateStepsList(); + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getUpdateSteps(int index); + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + int getUpdateStepsCount(); + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getUpdateStepsOrBuilderList(); + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder + getUpdateStepsOrBuilder(int index); + + /** + * + * + *
+     * Default is INSTALLED. The desired state the agent should maintain for this
+     * recipe.
+     * INSTALLED: The software recipe is installed on the instance but
+     *            won't be updated to new versions.
+     * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+     *                         instance. The recipe is updated to a higher
+     *                         version, if a higher version of the recipe is
+     *                         assigned to this instance.
+     * REMOVE: Remove is unsupported for software recipes and attempts to
+     *         create or update a recipe to the REMOVE state is rejected.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return The enum numeric value on the wire for desiredState. + */ + int getDesiredStateValue(); + /** + * + * + *
+     * Default is INSTALLED. The desired state the agent should maintain for this
+     * recipe.
+     * INSTALLED: The software recipe is installed on the instance but
+     *            won't be updated to new versions.
+     * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+     *                         instance. The recipe is updated to a higher
+     *                         version, if a higher version of the recipe is
+     *                         assigned to this instance.
+     * REMOVE: Remove is unsupported for software recipes and attempts to
+     *         create or update a recipe to the REMOVE state is rejected.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return The desiredState. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredState(); + } + /** + * + * + *
+   * A software recipe is a set of instructions for installing and configuring a
+   * piece of software. It consists of a set of artifacts that are
+   * downloaded, and a set of steps that install, configure, and/or update the
+   * software.
+   * Recipes support installing and updating software from artifacts in the
+   * following formats:
+   * Zip archive, Tar archive, Windows MSI, Debian package, and RPM package.
+   * Additionally, recipes support executing a script (either defined in a file or
+   * directly in this api) in bash, sh, cmd, and powershell.
+   * Updating a software recipe
+   * If a recipe is assigned to an instance and there is a recipe with the same
+   * name but a lower version already installed and the assigned state
+   * of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to
+   * the new version.
+   * Script Working Directories
+   * Each script or execution step is run in its own temporary directory which
+   * is deleted after completing the step.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe} + */ + public static final class SoftwareRecipe extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe) + SoftwareRecipeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SoftwareRecipe.newBuilder() to construct. + private SoftwareRecipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SoftwareRecipe() { + name_ = ""; + version_ = ""; + artifacts_ = java.util.Collections.emptyList(); + installSteps_ = java.util.Collections.emptyList(); + updateSteps_ = java.util.Collections.emptyList(); + desiredState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SoftwareRecipe(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SoftwareRecipe( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + artifacts_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact>(); + mutable_bitField0_ |= 0x00000001; + } + artifacts_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .parser(), + extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + installSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step>(); + mutable_bitField0_ |= 0x00000002; + } + installSteps_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.parser(), + extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + updateSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step>(); + mutable_bitField0_ |= 0x00000004; + } + updateSteps_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.parser(), + extensionRegistry)); + break; + } + case 48: + { + int rawValue = input.readEnum(); + + desiredState_ = 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)) { + artifacts_ = java.util.Collections.unmodifiableList(artifacts_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + installSteps_ = java.util.Collections.unmodifiableList(installSteps_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + updateSteps_ = java.util.Collections.unmodifiableList(updateSteps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder.class); + } + + public interface ArtifactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. Id of the artifact, which the installation and update steps of this
+       * recipe can reference. Artifacts in a recipe cannot have the same id.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+       * Required. Id of the artifact, which the installation and update steps of this
+       * recipe can reference. Artifacts in a recipe cannot have the same id.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+       * A generic remote artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + * + * @return Whether the remote field is set. + */ + boolean hasRemote(); + /** + * + * + *
+       * A generic remote artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + * + * @return The remote. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote getRemote(); + /** + * + * + *
+       * A generic remote artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.RemoteOrBuilder + getRemoteOrBuilder(); + + /** + * + * + *
+       * A Google Cloud Storage artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + * + * @return Whether the gcs field is set. + */ + boolean hasGcs(); + /** + * + * + *
+       * A Google Cloud Storage artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + * + * @return The gcs. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs getGcs(); + /** + * + * + *
+       * A Google Cloud Storage artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.GcsOrBuilder + getGcsOrBuilder(); + + /** + * + * + *
+       * Defaults to false. When false, recipes are subject to validations
+       * based on the artifact type:
+       * Remote: A checksum must be specified, and only protocols with
+       * transport-layer security are permitted.
+       * GCS:    An object generation number must be specified.
+       * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + boolean getAllowInsecure(); + + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.ArtifactCase + getArtifactCase(); + } + /** + * + * + *
+     * Specifies a resource to be used in the recipe.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact} + */ + public static final class Artifact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact) + ArtifactOrBuilder { + private static final long serialVersionUID = 0L; + // Use Artifact.newBuilder() to construct. + private Artifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Artifact() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Artifact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Artifact( + 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(); + + id_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .Builder + subBuilder = null; + if (artifactCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Remote) + artifact_) + .toBuilder(); + } + artifact_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Remote.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Remote) + artifact_); + artifact_ = subBuilder.buildPartial(); + } + artifactCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder + subBuilder = null; + if (artifactCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Gcs) + artifact_) + .toBuilder(); + } + artifact_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_); + artifact_ = subBuilder.buildPartial(); + } + artifactCase_ = 3; + break; + } + case 32: + { + allowInsecure_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + .class); + } + + public interface RemoteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * URI from which to fetch the object. It should contain both the protocol
+         * and path following the format {protocol}://{location}.
+         * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+         * URI from which to fetch the object. It should contain both the protocol
+         * and path following the format {protocol}://{location}.
+         * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+         * Must be provided if `allow_insecure` is `false`.
+         * SHA256 checksum in hex format, to compare to the checksum of the
+         * artifact. If the checksum is not empty and it doesn't match the
+         * artifact then the recipe installation fails before running any of the
+         * steps.
+         * 
+ * + * string checksum = 2; + * + * @return The checksum. + */ + java.lang.String getChecksum(); + /** + * + * + *
+         * Must be provided if `allow_insecure` is `false`.
+         * SHA256 checksum in hex format, to compare to the checksum of the
+         * artifact. If the checksum is not empty and it doesn't match the
+         * artifact then the recipe installation fails before running any of the
+         * steps.
+         * 
+ * + * string checksum = 2; + * + * @return The bytes for checksum. + */ + com.google.protobuf.ByteString getChecksumBytes(); + } + /** + * + * + *
+       * Specifies an artifact available via some URI.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote} + */ + public static final class Remote extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote) + RemoteOrBuilder { + private static final long serialVersionUID = 0L; + // Use Remote.newBuilder() to construct. + private Remote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Remote() { + uri_ = ""; + checksum_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Remote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Remote( + 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(); + + uri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + checksum_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + * + * + *
+         * URI from which to fetch the object. It should contain both the protocol
+         * and path following the format {protocol}://{location}.
+         * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+         * URI from which to fetch the object. It should contain both the protocol
+         * and path following the format {protocol}://{location}.
+         * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHECKSUM_FIELD_NUMBER = 2; + private volatile java.lang.Object checksum_; + /** + * + * + *
+         * Must be provided if `allow_insecure` is `false`.
+         * SHA256 checksum in hex format, to compare to the checksum of the
+         * artifact. If the checksum is not empty and it doesn't match the
+         * artifact then the recipe installation fails before running any of the
+         * steps.
+         * 
+ * + * string checksum = 2; + * + * @return The checksum. + */ + @java.lang.Override + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } + } + /** + * + * + *
+         * Must be provided if `allow_insecure` is `false`.
+         * SHA256 checksum in hex format, to compare to the checksum of the
+         * artifact. If the checksum is not empty and it doesn't match the
+         * artifact then the recipe installation fails before running any of the
+         * steps.
+         * 
+ * + * string checksum = 2; + * + * @return The bytes for checksum. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + checksum_ = 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 (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (!getChecksumBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, checksum_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + if (!getChecksumBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, checksum_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getChecksum().equals(other.getChecksum())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getChecksum().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Specifies an artifact available via some URI.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.RemoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote.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(); + uri_ = ""; + + checksum_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote( + this); + result.uri_ = uri_; + result.checksum_ = checksum_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + if (!other.getChecksum().isEmpty()) { + checksum_ = other.checksum_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+           * URI from which to fetch the object. It should contain both the protocol
+           * and path following the format {protocol}://{location}.
+           * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * URI from which to fetch the object. It should contain both the protocol
+           * and path following the format {protocol}://{location}.
+           * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * URI from which to fetch the object. It should contain both the protocol
+           * and path following the format {protocol}://{location}.
+           * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * URI from which to fetch the object. It should contain both the protocol
+           * and path following the format {protocol}://{location}.
+           * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+           * URI from which to fetch the object. It should contain both the protocol
+           * and path following the format {protocol}://{location}.
+           * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + private java.lang.Object checksum_ = ""; + /** + * + * + *
+           * Must be provided if `allow_insecure` is `false`.
+           * SHA256 checksum in hex format, to compare to the checksum of the
+           * artifact. If the checksum is not empty and it doesn't match the
+           * artifact then the recipe installation fails before running any of the
+           * steps.
+           * 
+ * + * string checksum = 2; + * + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Must be provided if `allow_insecure` is `false`.
+           * SHA256 checksum in hex format, to compare to the checksum of the
+           * artifact. If the checksum is not empty and it doesn't match the
+           * artifact then the recipe installation fails before running any of the
+           * steps.
+           * 
+ * + * string checksum = 2; + * + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Must be provided if `allow_insecure` is `false`.
+           * SHA256 checksum in hex format, to compare to the checksum of the
+           * artifact. If the checksum is not empty and it doesn't match the
+           * artifact then the recipe installation fails before running any of the
+           * steps.
+           * 
+ * + * string checksum = 2; + * + * @param value The checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksum(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + checksum_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Must be provided if `allow_insecure` is `false`.
+           * SHA256 checksum in hex format, to compare to the checksum of the
+           * artifact. If the checksum is not empty and it doesn't match the
+           * artifact then the recipe installation fails before running any of the
+           * steps.
+           * 
+ * + * string checksum = 2; + * + * @return This builder for chaining. + */ + public Builder clearChecksum() { + + checksum_ = getDefaultInstance().getChecksum(); + onChanged(); + return this; + } + /** + * + * + *
+           * Must be provided if `allow_insecure` is `false`.
+           * SHA256 checksum in hex format, to compare to the checksum of the
+           * artifact. If the checksum is not empty and it doesn't match the
+           * artifact then the recipe installation fails before running any of the
+           * steps.
+           * 
+ * + * string checksum = 2; + * + * @param value The bytes for checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksumBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + checksum_ = 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.v1beta.SoftwareRecipe.Artifact.Remote) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Remote + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Remote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Remote(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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GcsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Bucket of the Google Cloud Storage object.
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `my-bucket`.
+         * 
+ * + * string bucket = 1; + * + * @return The bucket. + */ + java.lang.String getBucket(); + /** + * + * + *
+         * Bucket of the Google Cloud Storage object.
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `my-bucket`.
+         * 
+ * + * string bucket = 1; + * + * @return The bytes for bucket. + */ + com.google.protobuf.ByteString getBucketBytes(); + + /** + * + * + *
+         * Name of the Google Cloud Storage object.
+         * As specified [here]
+         * (https://cloud.google.com/storage/docs/naming#objectnames)
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `foo/bar`.
+         * 
+ * + * string object = 2; + * + * @return The object. + */ + java.lang.String getObject(); + /** + * + * + *
+         * Name of the Google Cloud Storage object.
+         * As specified [here]
+         * (https://cloud.google.com/storage/docs/naming#objectnames)
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `foo/bar`.
+         * 
+ * + * string object = 2; + * + * @return The bytes for object. + */ + com.google.protobuf.ByteString getObjectBytes(); + + /** + * + * + *
+         * Must be provided if allow_insecure is false.
+         * Generation number of the Google Cloud Storage object.
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `1234567`.
+         * 
+ * + * int64 generation = 3; + * + * @return The generation. + */ + long getGeneration(); + } + /** + * + * + *
+       * Specifies an artifact available as a Google Cloud Storage object.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs} + */ + public static final class Gcs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs) + GcsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Gcs.newBuilder() to construct. + private Gcs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Gcs() { + bucket_ = ""; + object_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Gcs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Gcs( + 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: + { + generation_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder + .class); + } + + public static final int BUCKET_FIELD_NUMBER = 1; + private volatile java.lang.Object bucket_; + /** + * + * + *
+         * Bucket of the Google Cloud Storage object.
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `my-bucket`.
+         * 
+ * + * string bucket = 1; + * + * @return The bucket. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+         * Bucket of the Google Cloud Storage object.
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `my-bucket`.
+         * 
+ * + * string bucket = 1; + * + * @return The bytes for bucket. + */ + @java.lang.Override + 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_; + /** + * + * + *
+         * Name of the Google Cloud Storage object.
+         * As specified [here]
+         * (https://cloud.google.com/storage/docs/naming#objectnames)
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `foo/bar`.
+         * 
+ * + * string object = 2; + * + * @return The object. + */ + @java.lang.Override + 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; + } + } + /** + * + * + *
+         * Name of the Google Cloud Storage object.
+         * As specified [here]
+         * (https://cloud.google.com/storage/docs/naming#objectnames)
+         * Given an example URL:
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `foo/bar`.
+         * 
+ * + * string object = 2; + * + * @return The bytes for object. + */ + @java.lang.Override + 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_FIELD_NUMBER = 3; + private long generation_; + /** + * + * + *
+         * Must be provided if allow_insecure is false.
+         * Generation number of the Google Cloud Storage object.
+         * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+         * this value would be `1234567`.
+         * 
+ * + * int64 generation = 3; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + + 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 (generation_ != 0L) { + output.writeInt64(3, generation_); + } + 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 (generation_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generation_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) obj; + + if (!getBucket().equals(other.getBucket())) return false; + if (!getObject().equals(other.getObject())) return false; + if (getGeneration() != other.getGeneration()) 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_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+         * Specifies an artifact available as a Google Cloud Storage object.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.GcsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.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_ = ""; + + generation_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs( + this); + result.bucket_ = bucket_; + result.object_ = object_; + result.generation_ = generation_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance()) return this; + if (!other.getBucket().isEmpty()) { + bucket_ = other.bucket_; + onChanged(); + } + if (!other.getObject().isEmpty()) { + object_ = other.object_; + onChanged(); + } + if (other.getGeneration() != 0L) { + setGeneration(other.getGeneration()); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object bucket_ = ""; + /** + * + * + *
+           * Bucket of the Google Cloud Storage object.
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `my-bucket`.
+           * 
+ * + * string bucket = 1; + * + * @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; + } + } + /** + * + * + *
+           * Bucket of the Google Cloud Storage object.
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `my-bucket`.
+           * 
+ * + * string bucket = 1; + * + * @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; + } + } + /** + * + * + *
+           * Bucket of the Google Cloud Storage object.
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `my-bucket`.
+           * 
+ * + * string bucket = 1; + * + * @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; + } + /** + * + * + *
+           * Bucket of the Google Cloud Storage object.
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `my-bucket`.
+           * 
+ * + * string bucket = 1; + * + * @return This builder for chaining. + */ + public Builder clearBucket() { + + bucket_ = getDefaultInstance().getBucket(); + onChanged(); + return this; + } + /** + * + * + *
+           * Bucket of the Google Cloud Storage object.
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `my-bucket`.
+           * 
+ * + * string bucket = 1; + * + * @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_ = ""; + /** + * + * + *
+           * Name of the Google Cloud Storage object.
+           * As specified [here]
+           * (https://cloud.google.com/storage/docs/naming#objectnames)
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `foo/bar`.
+           * 
+ * + * string object = 2; + * + * @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; + } + } + /** + * + * + *
+           * Name of the Google Cloud Storage object.
+           * As specified [here]
+           * (https://cloud.google.com/storage/docs/naming#objectnames)
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `foo/bar`.
+           * 
+ * + * string object = 2; + * + * @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; + } + } + /** + * + * + *
+           * Name of the Google Cloud Storage object.
+           * As specified [here]
+           * (https://cloud.google.com/storage/docs/naming#objectnames)
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `foo/bar`.
+           * 
+ * + * string object = 2; + * + * @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; + } + /** + * + * + *
+           * Name of the Google Cloud Storage object.
+           * As specified [here]
+           * (https://cloud.google.com/storage/docs/naming#objectnames)
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `foo/bar`.
+           * 
+ * + * string object = 2; + * + * @return This builder for chaining. + */ + public Builder clearObject() { + + object_ = getDefaultInstance().getObject(); + onChanged(); + return this; + } + /** + * + * + *
+           * Name of the Google Cloud Storage object.
+           * As specified [here]
+           * (https://cloud.google.com/storage/docs/naming#objectnames)
+           * Given an example URL:
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `foo/bar`.
+           * 
+ * + * string object = 2; + * + * @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 generation_; + /** + * + * + *
+           * Must be provided if allow_insecure is false.
+           * Generation number of the Google Cloud Storage object.
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `1234567`.
+           * 
+ * + * int64 generation = 3; + * + * @return The generation. + */ + @java.lang.Override + public long getGeneration() { + return generation_; + } + /** + * + * + *
+           * Must be provided if allow_insecure is false.
+           * Generation number of the Google Cloud Storage object.
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `1234567`.
+           * 
+ * + * int64 generation = 3; + * + * @param value The generation to set. + * @return This builder for chaining. + */ + public Builder setGeneration(long value) { + + generation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Must be provided if allow_insecure is false.
+           * Generation number of the Google Cloud Storage object.
+           * `https://storage.googleapis.com/my-bucket/foo/bar#1234567`
+           * this value would be `1234567`.
+           * 
+ * + * int64 generation = 3; + * + * @return This builder for chaining. + */ + public Builder clearGeneration() { + + generation_ = 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.v1beta.SoftwareRecipe.Artifact.Gcs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Gcs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Gcs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Gcs(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.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int artifactCase_ = 0; + private java.lang.Object artifact_; + + public enum ArtifactCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + REMOTE(2), + GCS(3), + ARTIFACT_NOT_SET(0); + private final int value; + + private ArtifactCase(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 ArtifactCase valueOf(int value) { + return forNumber(value); + } + + public static ArtifactCase forNumber(int value) { + switch (value) { + case 2: + return REMOTE; + case 3: + return GCS; + case 0: + return ARTIFACT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ArtifactCase getArtifactCase() { + return ArtifactCase.forNumber(artifactCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+       * Required. Id of the artifact, which the installation and update steps of this
+       * recipe can reference. Artifacts in a recipe cannot have the same id.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+       * Required. Id of the artifact, which the installation and update steps of this
+       * recipe can reference. Artifacts in a recipe cannot have the same id.
+       * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_FIELD_NUMBER = 2; + /** + * + * + *
+       * A generic remote artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + * + * @return Whether the remote field is set. + */ + @java.lang.Override + public boolean hasRemote() { + return artifactCase_ == 2; + } + /** + * + * + *
+       * A generic remote artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + * + * @return The remote. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + getRemote() { + if (artifactCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } + /** + * + * + *
+       * A generic remote artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.RemoteOrBuilder + getRemoteOrBuilder() { + if (artifactCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } + + public static final int GCS_FIELD_NUMBER = 3; + /** + * + * + *
+       * A Google Cloud Storage artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + * + * @return Whether the gcs field is set. + */ + @java.lang.Override + public boolean hasGcs() { + return artifactCase_ == 3; + } + /** + * + * + *
+       * A Google Cloud Storage artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + * + * @return The gcs. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs getGcs() { + if (artifactCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } + /** + * + * + *
+       * A Google Cloud Storage artifact.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.GcsOrBuilder + getGcsOrBuilder() { + if (artifactCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } + + public static final int ALLOW_INSECURE_FIELD_NUMBER = 4; + private boolean allowInsecure_; + /** + * + * + *
+       * Defaults to false. When false, recipes are subject to validations
+       * based on the artifact type:
+       * Remote: A checksum must be specified, and only protocols with
+       * transport-layer security are permitted.
+       * GCS:    An object generation number must be specified.
+       * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + @java.lang.Override + public boolean getAllowInsecure() { + return allowInsecure_; + } + + 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 (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (artifactCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_); + } + if (artifactCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_); + } + if (allowInsecure_ != false) { + output.writeBool(4, allowInsecure_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (artifactCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_); + } + if (artifactCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_); + } + if (allowInsecure_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowInsecure_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact) obj; + + if (!getId().equals(other.getId())) return false; + if (getAllowInsecure() != other.getAllowInsecure()) return false; + if (!getArtifactCase().equals(other.getArtifactCase())) return false; + switch (artifactCase_) { + case 2: + if (!getRemote().equals(other.getRemote())) return false; + break; + case 3: + if (!getGcs().equals(other.getGcs())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + ALLOW_INSECURE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowInsecure()); + switch (artifactCase_) { + case 2: + hash = (37 * hash) + REMOTE_FIELD_NUMBER; + hash = (53 * hash) + getRemote().hashCode(); + break; + case 3: + hash = (37 * hash) + GCS_FIELD_NUMBER; + hash = (53 * hash) + getGcs().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Specifies a resource to be used in the recipe.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.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(); + id_ = ""; + + allowInsecure_ = false; + + artifactCase_ = 0; + artifact_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact(this); + result.id_ = id_; + if (artifactCase_ == 2) { + if (remoteBuilder_ == null) { + result.artifact_ = artifact_; + } else { + result.artifact_ = remoteBuilder_.build(); + } + } + if (artifactCase_ == 3) { + if (gcsBuilder_ == null) { + result.artifact_ = artifact_; + } else { + result.artifact_ = gcsBuilder_.build(); + } + } + result.allowInsecure_ = allowInsecure_; + result.artifactCase_ = artifactCase_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Artifact) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.getAllowInsecure() != false) { + setAllowInsecure(other.getAllowInsecure()); + } + switch (other.getArtifactCase()) { + case REMOTE: + { + mergeRemote(other.getRemote()); + break; + } + case GCS: + { + mergeGcs(other.getGcs()); + break; + } + case ARTIFACT_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.v1beta.GuestPolicies.SoftwareRecipe.Artifact parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int artifactCase_ = 0; + private java.lang.Object artifact_; + + public ArtifactCase getArtifactCase() { + return ArtifactCase.forNumber(artifactCase_); + } + + public Builder clearArtifact() { + artifactCase_ = 0; + artifact_ = null; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+         * Required. Id of the artifact, which the installation and update steps of this
+         * recipe can reference. Artifacts in a recipe cannot have the same id.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. Id of the artifact, which the installation and update steps of this
+         * recipe can reference. Artifacts in a recipe cannot have the same id.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. Id of the artifact, which the installation and update steps of this
+         * recipe can reference. Artifacts in a recipe cannot have the same id.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Id of the artifact, which the installation and update steps of this
+         * recipe can reference. Artifacts in a recipe cannot have the same id.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Id of the artifact, which the installation and update steps of this
+         * recipe can reference. Artifacts in a recipe cannot have the same id.
+         * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .RemoteOrBuilder> + remoteBuilder_; + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + * + * @return Whether the remote field is set. + */ + @java.lang.Override + public boolean hasRemote() { + return artifactCase_ == 2; + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + * + * @return The remote. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + getRemote() { + if (remoteBuilder_ == null) { + if (artifactCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } else { + if (artifactCase_ == 2) { + return remoteBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + public Builder setRemote( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote value) { + if (remoteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifact_ = value; + onChanged(); + } else { + remoteBuilder_.setMessage(value); + } + artifactCase_ = 2; + return this; + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + public Builder setRemote( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote.Builder + builderForValue) { + if (remoteBuilder_ == null) { + artifact_ = builderForValue.build(); + onChanged(); + } else { + remoteBuilder_.setMessage(builderForValue.build()); + } + artifactCase_ = 2; + return this; + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + public Builder mergeRemote( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote value) { + if (remoteBuilder_ == null) { + if (artifactCase_ == 2 + && artifact_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance()) { + artifact_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Remote) + artifact_) + .mergeFrom(value) + .buildPartial(); + } else { + artifact_ = value; + } + onChanged(); + } else { + if (artifactCase_ == 2) { + remoteBuilder_.mergeFrom(value); + } + remoteBuilder_.setMessage(value); + } + artifactCase_ = 2; + return this; + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + public Builder clearRemote() { + if (remoteBuilder_ == null) { + if (artifactCase_ == 2) { + artifactCase_ = 0; + artifact_ = null; + onChanged(); + } + } else { + if (artifactCase_ == 2) { + artifactCase_ = 0; + artifact_ = null; + } + remoteBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote.Builder + getRemoteBuilder() { + return getRemoteFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .RemoteOrBuilder + getRemoteOrBuilder() { + if ((artifactCase_ == 2) && (remoteBuilder_ != null)) { + return remoteBuilder_.getMessageOrBuilder(); + } else { + if (artifactCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A generic remote artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Remote remote = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .RemoteOrBuilder> + getRemoteFieldBuilder() { + if (remoteBuilder_ == null) { + if (!(artifactCase_ == 2)) { + artifact_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .getDefaultInstance(); + } + remoteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .RemoteOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Remote) + artifact_, + getParentForChildren(), + isClean()); + artifact_ = null; + } + artifactCase_ = 2; + onChanged(); + ; + return remoteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.GcsOrBuilder> + gcsBuilder_; + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + * + * @return Whether the gcs field is set. + */ + @java.lang.Override + public boolean hasGcs() { + return artifactCase_ == 3; + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + * + * @return The gcs. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs getGcs() { + if (gcsBuilder_ == null) { + if (artifactCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } else { + if (artifactCase_ == 3) { + return gcsBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + public Builder setGcs( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs value) { + if (gcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifact_ = value; + onChanged(); + } else { + gcsBuilder_.setMessage(value); + } + artifactCase_ = 3; + return this; + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + public Builder setGcs( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder + builderForValue) { + if (gcsBuilder_ == null) { + artifact_ = builderForValue.build(); + onChanged(); + } else { + gcsBuilder_.setMessage(builderForValue.build()); + } + artifactCase_ = 3; + return this; + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + public Builder mergeGcs( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs value) { + if (gcsBuilder_ == null) { + if (artifactCase_ == 3 + && artifact_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance()) { + artifact_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .Gcs) + artifact_) + .mergeFrom(value) + .buildPartial(); + } else { + artifact_ = value; + } + onChanged(); + } else { + if (artifactCase_ == 3) { + gcsBuilder_.mergeFrom(value); + } + gcsBuilder_.setMessage(value); + } + artifactCase_ = 3; + return this; + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + public Builder clearGcs() { + if (gcsBuilder_ == null) { + if (artifactCase_ == 3) { + artifactCase_ = 0; + artifact_ = null; + onChanged(); + } + } else { + if (artifactCase_ == 3) { + artifactCase_ = 0; + artifact_ = null; + } + gcsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder + getGcsBuilder() { + return getGcsFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.GcsOrBuilder + getGcsOrBuilder() { + if ((artifactCase_ == 3) && (gcsBuilder_ != null)) { + return gcsBuilder_.getMessageOrBuilder(); + } else { + if (artifactCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } + } + /** + * + * + *
+         * A Google Cloud Storage artifact.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact.Gcs gcs = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.GcsOrBuilder> + getGcsFieldBuilder() { + if (gcsBuilder_ == null) { + if (!(artifactCase_ == 3)) { + artifact_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .getDefaultInstance(); + } + gcsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .GcsOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Gcs) + artifact_, + getParentForChildren(), + isClean()); + artifact_ = null; + } + artifactCase_ = 3; + onChanged(); + ; + return gcsBuilder_; + } + + private boolean allowInsecure_; + /** + * + * + *
+         * Defaults to false. When false, recipes are subject to validations
+         * based on the artifact type:
+         * Remote: A checksum must be specified, and only protocols with
+         * transport-layer security are permitted.
+         * GCS:    An object generation number must be specified.
+         * 
+ * + * bool allow_insecure = 4; + * + * @return The allowInsecure. + */ + @java.lang.Override + public boolean getAllowInsecure() { + return allowInsecure_; + } + /** + * + * + *
+         * Defaults to false. When false, recipes are subject to validations
+         * based on the artifact type:
+         * Remote: A checksum must be specified, and only protocols with
+         * transport-layer security are permitted.
+         * GCS:    An object generation number must be specified.
+         * 
+ * + * bool allow_insecure = 4; + * + * @param value The allowInsecure to set. + * @return This builder for chaining. + */ + public Builder setAllowInsecure(boolean value) { + + allowInsecure_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Defaults to false. When false, recipes are subject to validations
+         * based on the artifact type:
+         * Remote: A checksum must be specified, and only protocols with
+         * transport-layer security are permitted.
+         * GCS:    An object generation number must be specified.
+         * 
+ * + * bool allow_insecure = 4; + * + * @return This builder for chaining. + */ + public Builder clearAllowInsecure() { + + allowInsecure_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Artifact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Artifact(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.v1beta.GuestPolicies.SoftwareRecipe.Artifact + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Copies a file onto the instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + * + * @return Whether the fileCopy field is set. + */ + boolean hasFileCopy(); + /** + * + * + *
+       * Copies a file onto the instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + * + * @return The fileCopy. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile getFileCopy(); + /** + * + * + *
+       * Copies a file onto the instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFileOrBuilder + getFileCopyOrBuilder(); + + /** + * + * + *
+       * Extracts an archive into the specified directory.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + * + * @return Whether the archiveExtraction field is set. + */ + boolean hasArchiveExtraction(); + /** + * + * + *
+       * Extracts an archive into the specified directory.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + * + * @return The archiveExtraction. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + getArchiveExtraction(); + /** + * + * + *
+       * Extracts an archive into the specified directory.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchiveOrBuilder + getArchiveExtractionOrBuilder(); + + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + * + * @return Whether the msiInstallation field is set. + */ + boolean hasMsiInstallation(); + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + * + * @return The msiInstallation. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + getMsiInstallation(); + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsiOrBuilder + getMsiInstallationOrBuilder(); + + /** + * + * + *
+       * Installs a deb file via dpkg.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + * + * @return Whether the dpkgInstallation field is set. + */ + boolean hasDpkgInstallation(); + /** + * + * + *
+       * Installs a deb file via dpkg.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + * + * @return The dpkgInstallation. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + getDpkgInstallation(); + /** + * + * + *
+       * Installs a deb file via dpkg.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkgOrBuilder + getDpkgInstallationOrBuilder(); + + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + * + * @return Whether the rpmInstallation field is set. + */ + boolean hasRpmInstallation(); + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + * + * @return The rpmInstallation. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + getRpmInstallation(); + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpmOrBuilder + getRpmInstallationOrBuilder(); + + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + * + * @return Whether the fileExec field is set. + */ + boolean hasFileExec(); + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + * + * @return The fileExec. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile getFileExec(); + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFileOrBuilder + getFileExecOrBuilder(); + + /** + * + * + *
+       * Runs commands in a shell.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + * + * @return Whether the scriptRun field is set. + */ + boolean hasScriptRun(); + /** + * + * + *
+       * Runs commands in a shell.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + * + * @return The scriptRun. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript getScriptRun(); + /** + * + * + *
+       * Runs commands in a shell.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder + getScriptRunOrBuilder(); + + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.StepCase + getStepCase(); + } + /** + * + * + *
+     * An action that can be taken as part of installing or updating a recipe.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step} + */ + public static final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Step( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .Builder + subBuilder = null; + if (stepCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFile) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFile.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFile) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 1; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .Builder + subBuilder = null; + if (stepCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 2; + break; + } + case 26: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .Builder + subBuilder = null; + if (stepCase_ == 3) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsi) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsi.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsi) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 3; + break; + } + case 34: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder + subBuilder = null; + if (stepCase_ == 4) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 4; + break; + } + case 42: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .Builder + subBuilder = null; + if (stepCase_ == 5) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpm) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpm.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpm) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 5; + break; + } + case 50: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .Builder + subBuilder = null; + if (stepCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFile) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFile.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFile) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Builder + subBuilder = null; + if (stepCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScript) + step_) + .toBuilder(); + } + step_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScript.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScript) + step_); + step_ = subBuilder.buildPartial(); + } + stepCase_ = 7; + 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder.class); + } + + public interface CopyFileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + + /** + * + * + *
+         * Required. The absolute path on the instance to put the file.
+         * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destination. + */ + java.lang.String getDestination(); + /** + * + * + *
+         * Required. The absolute path on the instance to put the file.
+         * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destination. + */ + com.google.protobuf.ByteString getDestinationBytes(); + + /** + * + * + *
+         * Whether to allow this step to overwrite existing files. If this is
+         * false and the file already exists the file is not overwritten
+         * and the step is considered a success. Defaults to false.
+         * 
+ * + * bool overwrite = 3; + * + * @return The overwrite. + */ + boolean getOverwrite(); + + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod utility).
+         * Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 4; + * + * @return The permissions. + */ + java.lang.String getPermissions(); + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod utility).
+         * Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 4; + * + * @return The bytes for permissions. + */ + com.google.protobuf.ByteString getPermissionsBytes(); + } + /** + * + * + *
+       * Copies the artifact to the specified path on the instance.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile} + */ + public static final class CopyFile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile) + CopyFileOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyFile.newBuilder() to construct. + private CopyFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyFile() { + artifactId_ = ""; + destination_ = ""; + permissions_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyFile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CopyFile( + 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(); + + artifactId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + destination_ = s; + break; + } + case 24: + { + overwrite_ = input.readBool(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + permissions_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .Builder.class); + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object artifactId_; + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_FIELD_NUMBER = 2; + private volatile java.lang.Object destination_; + /** + * + * + *
+         * Required. The absolute path on the instance to put the file.
+         * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destination. + */ + @java.lang.Override + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destination_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The absolute path on the instance to put the file.
+         * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destination. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OVERWRITE_FIELD_NUMBER = 3; + private boolean overwrite_; + /** + * + * + *
+         * Whether to allow this step to overwrite existing files. If this is
+         * false and the file already exists the file is not overwritten
+         * and the step is considered a success. Defaults to false.
+         * 
+ * + * bool overwrite = 3; + * + * @return The overwrite. + */ + @java.lang.Override + public boolean getOverwrite() { + return overwrite_; + } + + public static final int PERMISSIONS_FIELD_NUMBER = 4; + private volatile java.lang.Object permissions_; + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod utility).
+         * Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 4; + * + * @return The permissions. + */ + @java.lang.Override + public java.lang.String getPermissions() { + java.lang.Object ref = permissions_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permissions_ = s; + return s; + } + } + /** + * + * + *
+         * Consists of three octal digits which represent, in
+         * order, the permissions of the owner, group, and other users for the
+         * file (similarly to the numeric mode used in the linux chmod utility).
+         * Each digit represents a three bit number with the 4 bit
+         * corresponding to the read permissions, the 2 bit corresponds to the
+         * write bit, and the one bit corresponds to the execute permission.
+         * Default behavior is 755.
+         * Below are some examples of permissions and their associated values:
+         * read, write, and execute: 7
+         * read and execute: 5
+         * read and write: 6
+         * read only: 4
+         * 
+ * + * string permissions = 4; + * + * @return The bytes for permissions. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPermissionsBytes() { + java.lang.Object ref = permissions_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + permissions_ = 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 (!getArtifactIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactId_); + } + if (!getDestinationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (overwrite_ != false) { + output.writeBool(3, overwrite_); + } + if (!getPermissionsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, permissions_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArtifactIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactId_); + } + if (!getDestinationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (overwrite_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, overwrite_); + } + if (!getPermissionsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, permissions_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) obj; + + if (!getArtifactId().equals(other.getArtifactId())) return false; + if (!getDestination().equals(other.getDestination())) return false; + if (getOverwrite() != other.getOverwrite()) return false; + if (!getPermissions().equals(other.getPermissions())) 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) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + hash = (37 * hash) + OVERWRITE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOverwrite()); + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissions().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile 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; + } + /** + * + * + *
+         * Copies the artifact to the specified path on the instance.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile.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(); + artifactId_ = ""; + + destination_ = ""; + + overwrite_ = false; + + permissions_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile( + this); + result.artifactId_ = artifactId_; + result.destination_ = destination_; + result.overwrite_ = overwrite_; + result.permissions_ = permissions_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance()) return this; + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + onChanged(); + } + if (!other.getDestination().isEmpty()) { + destination_ = other.destination_; + onChanged(); + } + if (other.getOverwrite() != false) { + setOverwrite(other.getOverwrite()); + } + if (!other.getPermissions().isEmpty()) { + permissions_ = other.permissions_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object artifactId_ = ""; + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + + artifactId_ = getDefaultInstance().getArtifactId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactId_ = value; + onChanged(); + return this; + } + + private java.lang.Object destination_ = ""; + /** + * + * + *
+           * Required. The absolute path on the instance to put the file.
+           * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destination. + */ + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destination_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The absolute path on the instance to put the file.
+           * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destination. + */ + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The absolute path on the instance to put the file.
+           * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The destination to set. + * @return This builder for chaining. + */ + public Builder setDestination(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The absolute path on the instance to put the file.
+           * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDestination() { + + destination_ = getDefaultInstance().getDestination(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The absolute path on the instance to put the file.
+           * 
+ * + * string destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for destination to set. + * @return This builder for chaining. + */ + public Builder setDestinationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destination_ = value; + onChanged(); + return this; + } + + private boolean overwrite_; + /** + * + * + *
+           * Whether to allow this step to overwrite existing files. If this is
+           * false and the file already exists the file is not overwritten
+           * and the step is considered a success. Defaults to false.
+           * 
+ * + * bool overwrite = 3; + * + * @return The overwrite. + */ + @java.lang.Override + public boolean getOverwrite() { + return overwrite_; + } + /** + * + * + *
+           * Whether to allow this step to overwrite existing files. If this is
+           * false and the file already exists the file is not overwritten
+           * and the step is considered a success. Defaults to false.
+           * 
+ * + * bool overwrite = 3; + * + * @param value The overwrite to set. + * @return This builder for chaining. + */ + public Builder setOverwrite(boolean value) { + + overwrite_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Whether to allow this step to overwrite existing files. If this is
+           * false and the file already exists the file is not overwritten
+           * and the step is considered a success. Defaults to false.
+           * 
+ * + * bool overwrite = 3; + * + * @return This builder for chaining. + */ + public Builder clearOverwrite() { + + overwrite_ = false; + onChanged(); + return this; + } + + private java.lang.Object permissions_ = ""; + /** + * + * + *
+           * Consists of three octal digits which represent, in
+           * order, the permissions of the owner, group, and other users for the
+           * file (similarly to the numeric mode used in the linux chmod utility).
+           * Each digit represents a three bit number with the 4 bit
+           * corresponding to the read permissions, the 2 bit corresponds to the
+           * write bit, and the one bit corresponds to the execute permission.
+           * Default behavior is 755.
+           * Below are some examples of permissions and their associated values:
+           * read, write, and execute: 7
+           * read and execute: 5
+           * read and write: 6
+           * read only: 4
+           * 
+ * + * string permissions = 4; + * + * @return The permissions. + */ + public java.lang.String getPermissions() { + java.lang.Object ref = permissions_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + permissions_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Consists of three octal digits which represent, in
+           * order, the permissions of the owner, group, and other users for the
+           * file (similarly to the numeric mode used in the linux chmod utility).
+           * Each digit represents a three bit number with the 4 bit
+           * corresponding to the read permissions, the 2 bit corresponds to the
+           * write bit, and the one bit corresponds to the execute permission.
+           * Default behavior is 755.
+           * Below are some examples of permissions and their associated values:
+           * read, write, and execute: 7
+           * read and execute: 5
+           * read and write: 6
+           * read only: 4
+           * 
+ * + * string permissions = 4; + * + * @return The bytes for permissions. + */ + public com.google.protobuf.ByteString getPermissionsBytes() { + java.lang.Object ref = permissions_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + permissions_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Consists of three octal digits which represent, in
+           * order, the permissions of the owner, group, and other users for the
+           * file (similarly to the numeric mode used in the linux chmod utility).
+           * Each digit represents a three bit number with the 4 bit
+           * corresponding to the read permissions, the 2 bit corresponds to the
+           * write bit, and the one bit corresponds to the execute permission.
+           * Default behavior is 755.
+           * Below are some examples of permissions and their associated values:
+           * read, write, and execute: 7
+           * read and execute: 5
+           * read and write: 6
+           * read only: 4
+           * 
+ * + * string permissions = 4; + * + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + permissions_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Consists of three octal digits which represent, in
+           * order, the permissions of the owner, group, and other users for the
+           * file (similarly to the numeric mode used in the linux chmod utility).
+           * Each digit represents a three bit number with the 4 bit
+           * corresponding to the read permissions, the 2 bit corresponds to the
+           * write bit, and the one bit corresponds to the execute permission.
+           * Default behavior is 755.
+           * Below are some examples of permissions and their associated values:
+           * read, write, and execute: 7
+           * read and execute: 5
+           * read and write: 6
+           * read only: 4
+           * 
+ * + * string permissions = 4; + * + * @return This builder for chaining. + */ + public Builder clearPermissions() { + + permissions_ = getDefaultInstance().getPermissions(); + onChanged(); + return this; + } + /** + * + * + *
+           * Consists of three octal digits which represent, in
+           * order, the permissions of the owner, group, and other users for the
+           * file (similarly to the numeric mode used in the linux chmod utility).
+           * Each digit represents a three bit number with the 4 bit
+           * corresponding to the read permissions, the 2 bit corresponds to the
+           * write bit, and the one bit corresponds to the execute permission.
+           * Default behavior is 755.
+           * Below are some examples of permissions and their associated values:
+           * read, write, and execute: 7
+           * read and execute: 5
+           * read and write: 6
+           * read only: 4
+           * 
+ * + * string permissions = 4; + * + * @param value The bytes for permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + permissions_ = 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.v1beta.SoftwareRecipe.Step.CopyFile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFile + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CopyFile(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.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExtractArchiveOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + + /** + * + * + *
+         * Directory to extract archive to.
+         * Defaults to `/` on Linux or `C:\` on Windows.
+         * 
+ * + * string destination = 2; + * + * @return The destination. + */ + java.lang.String getDestination(); + /** + * + * + *
+         * Directory to extract archive to.
+         * Defaults to `/` on Linux or `C:\` on Windows.
+         * 
+ * + * string destination = 2; + * + * @return The bytes for destination. + */ + com.google.protobuf.ByteString getDestinationBytes(); + + /** + * + * + *
+         * Required. The type of the archive to extract.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+         * Required. The type of the archive to extract.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType + getType(); + } + /** + * + * + *
+       * Extracts an archive of the type specified in the specified directory.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive} + */ + public static final class ExtractArchive extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive) + ExtractArchiveOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExtractArchive.newBuilder() to construct. + private ExtractArchive(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExtractArchive() { + artifactId_ = ""; + destination_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExtractArchive(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExtractArchive( + 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(); + + artifactId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + destination_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .Builder.class); + } + + /** + * + * + *
+         * Specifying the type of archive.
+         * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType} + */ + public enum ArchiveType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Indicates that the archive type isn't specified.
+           * 
+ * + * ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + ARCHIVE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+           * Indicates that the archive is a tar archive with no encryption.
+           * 
+ * + * TAR = 1; + */ + TAR(1), + /** + * + * + *
+           * Indicates that the archive is a tar archive with gzip encryption.
+           * 
+ * + * TAR_GZIP = 2; + */ + TAR_GZIP(2), + /** + * + * + *
+           * Indicates that the archive is a tar archive with bzip encryption.
+           * 
+ * + * TAR_BZIP = 3; + */ + TAR_BZIP(3), + /** + * + * + *
+           * Indicates that the archive is a tar archive with lzma encryption.
+           * 
+ * + * TAR_LZMA = 4; + */ + TAR_LZMA(4), + /** + * + * + *
+           * Indicates that the archive is a tar archive with xz encryption.
+           * 
+ * + * TAR_XZ = 5; + */ + TAR_XZ(5), + /** + * + * + *
+           * Indicates that the archive is a zip archive.
+           * 
+ * + * ZIP = 11; + */ + ZIP(11), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+           * Indicates that the archive type isn't specified.
+           * 
+ * + * ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + public static final int ARCHIVE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+           * Indicates that the archive is a tar archive with no encryption.
+           * 
+ * + * TAR = 1; + */ + public static final int TAR_VALUE = 1; + /** + * + * + *
+           * Indicates that the archive is a tar archive with gzip encryption.
+           * 
+ * + * TAR_GZIP = 2; + */ + public static final int TAR_GZIP_VALUE = 2; + /** + * + * + *
+           * Indicates that the archive is a tar archive with bzip encryption.
+           * 
+ * + * TAR_BZIP = 3; + */ + public static final int TAR_BZIP_VALUE = 3; + /** + * + * + *
+           * Indicates that the archive is a tar archive with lzma encryption.
+           * 
+ * + * TAR_LZMA = 4; + */ + public static final int TAR_LZMA_VALUE = 4; + /** + * + * + *
+           * Indicates that the archive is a tar archive with xz encryption.
+           * 
+ * + * TAR_XZ = 5; + */ + public static final int TAR_XZ_VALUE = 5; + /** + * + * + *
+           * Indicates that the archive is a zip archive.
+           * 
+ * + * ZIP = 11; + */ + public static final int ZIP_VALUE = 11; + + 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 ArchiveType 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 ArchiveType forNumber(int value) { + switch (value) { + case 0: + return ARCHIVE_TYPE_UNSPECIFIED; + case 1: + return TAR; + case 2: + return TAR_GZIP; + case 3: + return TAR_BZIP; + case 4: + return TAR_LZMA; + case 5: + return TAR_XZ; + case 11: + return ZIP; + 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 ArchiveType findValueByNumber(int number) { + return ArchiveType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ArchiveType[] VALUES = values(); + + public static ArchiveType 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 ArchiveType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType) + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object artifactId_; + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_FIELD_NUMBER = 2; + private volatile java.lang.Object destination_; + /** + * + * + *
+         * Directory to extract archive to.
+         * Defaults to `/` on Linux or `C:\` on Windows.
+         * 
+ * + * string destination = 2; + * + * @return The destination. + */ + @java.lang.Override + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destination_ = s; + return s; + } + } + /** + * + * + *
+         * Directory to extract archive to.
+         * Defaults to `/` on Linux or `C:\` on Windows.
+         * 
+ * + * string destination = 2; + * + * @return The bytes for destination. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + * + * + *
+         * Required. The type of the archive to extract.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+         * Required. The type of the archive to extract.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType + getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType + result = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType.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 (!getArtifactIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactId_); + } + if (!getDestinationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destination_); + } + if (type_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType.ARCHIVE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArtifactIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactId_); + } + if (!getDestinationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destination_); + } + if (type_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType.ARCHIVE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive) + obj; + + if (!getArtifactId().equals(other.getArtifactId())) return false; + if (!getDestination().equals(other.getDestination())) return false; + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + 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.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + 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.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + 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.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + 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.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + 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; + } + /** + * + * + *
+         * Extracts an archive of the type specified in the specified directory.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchiveOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive.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(); + artifactId_ = ""; + + destination_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive(this); + result.artifactId_ = artifactId_; + result.destination_ = destination_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance()) return this; + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + onChanged(); + } + if (!other.getDestination().isEmpty()) { + destination_ = other.destination_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object artifactId_ = ""; + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + + artifactId_ = getDefaultInstance().getArtifactId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactId_ = value; + onChanged(); + return this; + } + + private java.lang.Object destination_ = ""; + /** + * + * + *
+           * Directory to extract archive to.
+           * Defaults to `/` on Linux or `C:\` on Windows.
+           * 
+ * + * string destination = 2; + * + * @return The destination. + */ + public java.lang.String getDestination() { + java.lang.Object ref = destination_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destination_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Directory to extract archive to.
+           * Defaults to `/` on Linux or `C:\` on Windows.
+           * 
+ * + * string destination = 2; + * + * @return The bytes for destination. + */ + public com.google.protobuf.ByteString getDestinationBytes() { + java.lang.Object ref = destination_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destination_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Directory to extract archive to.
+           * Defaults to `/` on Linux or `C:\` on Windows.
+           * 
+ * + * string destination = 2; + * + * @param value The destination to set. + * @return This builder for chaining. + */ + public Builder setDestination(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Directory to extract archive to.
+           * Defaults to `/` on Linux or `C:\` on Windows.
+           * 
+ * + * string destination = 2; + * + * @return This builder for chaining. + */ + public Builder clearDestination() { + + destination_ = getDefaultInstance().getDestination(); + onChanged(); + return this; + } + /** + * + * + *
+           * Directory to extract archive to.
+           * Defaults to `/` on Linux or `C:\` on Windows.
+           * 
+ * + * string destination = 2; + * + * @param value The bytes for destination to set. + * @return This builder for chaining. + */ + public Builder setDestinationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destination_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+           * Required. The type of the archive to extract.
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+           * Required. The type of the archive to extract.
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The type of the archive to extract.
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType + getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType + result = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive.ArchiveType.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType.UNRECOGNIZED + : result; + } + /** + * + * + *
+           * Required. The type of the archive to extract.
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .ArchiveType + value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The type of the archive to extract.
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive.ArchiveType type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtractArchive parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExtractArchive(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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstallMsiOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @return A list containing the flags. + */ + java.util.List getFlagsList(); + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @return The count of flags. + */ + int getFlagsCount(); + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @param index The index of the element to return. + * @return The flags at the given index. + */ + java.lang.String getFlags(int index); + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the flags at the given index. + */ + com.google.protobuf.ByteString getFlagsBytes(int index); + + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return A list containing the allowedExitCodes. + */ + java.util.List getAllowedExitCodesList(); + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return The count of allowedExitCodes. + */ + int getAllowedExitCodesCount(); + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + int getAllowedExitCodes(int index); + } + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi} + */ + public static final class InstallMsi extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi) + InstallMsiOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstallMsi.newBuilder() to construct. + private InstallMsi(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstallMsi() { + artifactId_ = ""; + flags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + allowedExitCodes_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstallMsi(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstallMsi( + 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(); + + artifactId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + flags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + flags_.add(s); + break; + } + case 24: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + allowedExitCodes_.addInt(input.readInt32()); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) + && input.getBytesUntilLimit() > 0) { + allowedExitCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + allowedExitCodes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + flags_ = flags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .Builder.class); + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object artifactId_; + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FLAGS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList flags_; + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @return A list containing the flags. + */ + public com.google.protobuf.ProtocolStringList getFlagsList() { + return flags_; + } + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @return The count of flags. + */ + public int getFlagsCount() { + return flags_.size(); + } + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @param index The index of the element to return. + * @return The flags at the given index. + */ + public java.lang.String getFlags(int index) { + return flags_.get(index); + } + /** + * + * + *
+         * The flags to use when installing the MSI
+         * defaults to ["/i"] (i.e. the install flag).
+         * 
+ * + * repeated string flags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the flags at the given index. + */ + public com.google.protobuf.ByteString getFlagsBytes(int index) { + return flags_.getByteString(index); + } + + public static final int ALLOWED_EXIT_CODES_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList allowedExitCodes_; + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return A list containing the allowedExitCodes. + */ + @java.lang.Override + public java.util.List getAllowedExitCodesList() { + return allowedExitCodes_; + } + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return The count of allowedExitCodes. + */ + public int getAllowedExitCodesCount() { + return allowedExitCodes_.size(); + } + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + public int getAllowedExitCodes(int index) { + return allowedExitCodes_.getInt(index); + } + + private int allowedExitCodesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!getArtifactIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactId_); + } + for (int i = 0; i < flags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, flags_.getRaw(i)); + } + if (getAllowedExitCodesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(allowedExitCodesMemoizedSerializedSize); + } + for (int i = 0; i < allowedExitCodes_.size(); i++) { + output.writeInt32NoTag(allowedExitCodes_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArtifactIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactId_); + } + { + int dataSize = 0; + for (int i = 0; i < flags_.size(); i++) { + dataSize += computeStringSizeNoTag(flags_.getRaw(i)); + } + size += dataSize; + size += 1 * getFlagsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedExitCodes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + allowedExitCodes_.getInt(i)); + } + size += dataSize; + if (!getAllowedExitCodesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + allowedExitCodesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) obj; + + if (!getArtifactId().equals(other.getArtifactId())) return false; + if (!getFlagsList().equals(other.getFlagsList())) return false; + if (!getAllowedExitCodesList().equals(other.getAllowedExitCodesList())) 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) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + if (getFlagsCount() > 0) { + hash = (37 * hash) + FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getFlagsList().hashCode(); + } + if (getAllowedExitCodesCount() > 0) { + hash = (37 * hash) + ALLOWED_EXIT_CODES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedExitCodesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + 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; + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsiOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi.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(); + artifactId_ = ""; + + flags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + allowedExitCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi( + this); + int from_bitField0_ = bitField0_; + result.artifactId_ = artifactId_; + if (((bitField0_ & 0x00000001) != 0)) { + flags_ = flags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.flags_ = flags_; + if (((bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.allowedExitCodes_ = allowedExitCodes_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance()) return this; + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + onChanged(); + } + if (!other.flags_.isEmpty()) { + if (flags_.isEmpty()) { + flags_ = other.flags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFlagsIsMutable(); + flags_.addAll(other.flags_); + } + onChanged(); + } + if (!other.allowedExitCodes_.isEmpty()) { + if (allowedExitCodes_.isEmpty()) { + allowedExitCodes_ = other.allowedExitCodes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.addAll(other.allowedExitCodes_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object artifactId_ = ""; + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + + artifactId_ = getDefaultInstance().getArtifactId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList flags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFlagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + flags_ = new com.google.protobuf.LazyStringArrayList(flags_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @return A list containing the flags. + */ + public com.google.protobuf.ProtocolStringList getFlagsList() { + return flags_.getUnmodifiableView(); + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @return The count of flags. + */ + public int getFlagsCount() { + return flags_.size(); + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @param index The index of the element to return. + * @return The flags at the given index. + */ + public java.lang.String getFlags(int index) { + return flags_.get(index); + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @param index The index of the value to return. + * @return The bytes of the flags at the given index. + */ + public com.google.protobuf.ByteString getFlagsBytes(int index) { + return flags_.getByteString(index); + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @param index The index to set the value at. + * @param value The flags to set. + * @return This builder for chaining. + */ + public Builder setFlags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlagsIsMutable(); + flags_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @param value The flags to add. + * @return This builder for chaining. + */ + public Builder addFlags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlagsIsMutable(); + flags_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @param values The flags to add. + * @return This builder for chaining. + */ + public Builder addAllFlags(java.lang.Iterable values) { + ensureFlagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, flags_); + onChanged(); + return this; + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @return This builder for chaining. + */ + public Builder clearFlags() { + flags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * The flags to use when installing the MSI
+           * defaults to ["/i"] (i.e. the install flag).
+           * 
+ * + * repeated string flags = 2; + * + * @param value The bytes of the flags to add. + * @return This builder for chaining. + */ + public Builder addFlagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFlagsIsMutable(); + flags_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList allowedExitCodes_ = emptyIntList(); + + private void ensureAllowedExitCodesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_ = mutableCopy(allowedExitCodes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return A list containing the allowedExitCodes. + */ + public java.util.List getAllowedExitCodesList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(allowedExitCodes_) + : allowedExitCodes_; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return The count of allowedExitCodes. + */ + public int getAllowedExitCodesCount() { + return allowedExitCodes_.size(); + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + public int getAllowedExitCodes(int index) { + return allowedExitCodes_.getInt(index); + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @param index The index to set the value at. + * @param value The allowedExitCodes to set. + * @return This builder for chaining. + */ + public Builder setAllowedExitCodes(int index, int value) { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @param value The allowedExitCodes to add. + * @return This builder for chaining. + */ + public Builder addAllowedExitCodes(int value) { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @param values The allowedExitCodes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedExitCodes( + java.lang.Iterable values) { + ensureAllowedExitCodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedExitCodes_); + onChanged(); + return this; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 3; + * + * @return This builder for chaining. + */ + public Builder clearAllowedExitCodes() { + allowedExitCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + 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.v1beta.SoftwareRecipe.Step.InstallMsi) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsi + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstallMsi parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstallMsi(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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstallDpkgOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + } + /** + * + * + *
+       * Installs a deb via dpkg.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg} + */ + public static final class InstallDpkg extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg) + InstallDpkgOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstallDpkg.newBuilder() to construct. + private InstallDpkg(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstallDpkg() { + artifactId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstallDpkg(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstallDpkg( + 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(); + + artifactId_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder.class); + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object artifactId_; + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = 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 (!getArtifactIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArtifactIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactId_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) obj; + + if (!getArtifactId().equals(other.getArtifactId())) 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) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + 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; + } + /** + * + * + *
+         * Installs a deb via dpkg.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg.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(); + artifactId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg( + this); + result.artifactId_ = artifactId_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance()) return this; + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object artifactId_ = ""; + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + + artifactId_ = getDefaultInstance().getArtifactId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactId_ = 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.v1beta.SoftwareRecipe.Step.InstallDpkg) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstallDpkg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstallDpkg(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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstallRpmOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + } + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm} + */ + public static final class InstallRpm extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm) + InstallRpmOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstallRpm.newBuilder() to construct. + private InstallRpm(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InstallRpm() { + artifactId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InstallRpm(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InstallRpm( + 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(); + + artifactId_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .Builder.class); + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object artifactId_; + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = 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 (!getArtifactIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArtifactIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactId_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) obj; + + if (!getArtifactId().equals(other.getArtifactId())) 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) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + 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; + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpmOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm.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(); + artifactId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm( + this); + result.artifactId_ = artifactId_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance()) return this; + if (!other.getArtifactId().isEmpty()) { + artifactId_ = other.artifactId_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object artifactId_ = ""; + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = artifactId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = artifactId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + + artifactId_ = getDefaultInstance().getArtifactId(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactId_ = 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.v1beta.SoftwareRecipe.Step.InstallRpm) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpm + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstallRpm parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstallRpm(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.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecFileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1; + * + * @return Whether the artifactId field is set. + */ + boolean hasArtifactId(); + /** + * + * + *
+         * The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1; + * + * @return The artifactId. + */ + java.lang.String getArtifactId(); + /** + * + * + *
+         * The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1; + * + * @return The bytes for artifactId. + */ + com.google.protobuf.ByteString getArtifactIdBytes(); + + /** + * + * + *
+         * The absolute path of the file on the local filesystem.
+         * 
+ * + * string local_path = 2; + * + * @return Whether the localPath field is set. + */ + boolean hasLocalPath(); + /** + * + * + *
+         * The absolute path of the file on the local filesystem.
+         * 
+ * + * string local_path = 2; + * + * @return The localPath. + */ + java.lang.String getLocalPath(); + /** + * + * + *
+         * The absolute path of the file on the local filesystem.
+         * 
+ * + * string local_path = 2; + * + * @return The bytes for localPath. + */ + com.google.protobuf.ByteString getLocalPathBytes(); + + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + java.util.List getArgsList(); + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + int getArgsCount(); + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + java.lang.String getArgs(int index); + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + com.google.protobuf.ByteString getArgsBytes(int index); + + /** + * + * + *
+         * Defaults to [0]. A list of possible return values that the program
+         * can return to indicate a success.
+         * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return A list containing the allowedExitCodes. + */ + java.util.List getAllowedExitCodesList(); + /** + * + * + *
+         * Defaults to [0]. A list of possible return values that the program
+         * can return to indicate a success.
+         * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return The count of allowedExitCodes. + */ + int getAllowedExitCodesCount(); + /** + * + * + *
+         * Defaults to [0]. A list of possible return values that the program
+         * can return to indicate a success.
+         * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + int getAllowedExitCodes(int index); + + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .LocationTypeCase + getLocationTypeCase(); + } + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile} + */ + public static final class ExecFile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile) + ExecFileOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecFile.newBuilder() to construct. + private ExecFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecFile() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + allowedExitCodes_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecFile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExecFile( + 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(); + locationTypeCase_ = 1; + locationType_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + locationTypeCase_ = 2; + locationType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + args_.add(s); + break; + } + case 32: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + allowedExitCodes_.addInt(input.readInt32()); + break; + } + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) + && input.getBytesUntilLimit() > 0) { + allowedExitCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + allowedExitCodes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + args_ = args_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .Builder.class); + } + + private int locationTypeCase_ = 0; + private java.lang.Object locationType_; + + public enum LocationTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ARTIFACT_ID(1), + LOCAL_PATH(2), + LOCATIONTYPE_NOT_SET(0); + private final int value; + + private LocationTypeCase(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 LocationTypeCase valueOf(int value) { + return forNumber(value); + } + + public static LocationTypeCase forNumber(int value) { + switch (value) { + case 1: + return ARTIFACT_ID; + case 2: + return LOCAL_PATH; + case 0: + return LOCATIONTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public LocationTypeCase getLocationTypeCase() { + return LocationTypeCase.forNumber(locationTypeCase_); + } + + public static final int ARTIFACT_ID_FIELD_NUMBER = 1; + /** + * + * + *
+         * The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1; + * + * @return Whether the artifactId field is set. + */ + public boolean hasArtifactId() { + return locationTypeCase_ == 1; + } + /** + * + * + *
+         * The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1; + * + * @return The artifactId. + */ + public java.lang.String getArtifactId() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (ref instanceof java.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 (locationTypeCase_ == 1) { + locationType_ = s; + } + return s; + } + } + /** + * + * + *
+         * The id of the relevant artifact in the recipe.
+         * 
+ * + * string artifact_id = 1; + * + * @return The bytes for artifactId. + */ + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationTypeCase_ == 1) { + locationType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCAL_PATH_FIELD_NUMBER = 2; + /** + * + * + *
+         * The absolute path of the file on the local filesystem.
+         * 
+ * + * string local_path = 2; + * + * @return Whether the localPath field is set. + */ + public boolean hasLocalPath() { + return locationTypeCase_ == 2; + } + /** + * + * + *
+         * The absolute path of the file on the local filesystem.
+         * 
+ * + * string local_path = 2; + * + * @return The localPath. + */ + public java.lang.String getLocalPath() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 2) { + ref = locationType_; + } + if (ref instanceof java.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 (locationTypeCase_ == 2) { + locationType_ = s; + } + return s; + } + } + /** + * + * + *
+         * The absolute path of the file on the local filesystem.
+         * 
+ * + * string local_path = 2; + * + * @return The bytes for localPath. + */ + public com.google.protobuf.ByteString getLocalPathBytes() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 2) { + ref = locationType_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationTypeCase_ == 2) { + locationType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARGS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList args_; + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_; + } + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+         * Arguments to be passed to the provided executable.
+         * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + + public static final int ALLOWED_EXIT_CODES_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList allowedExitCodes_; + /** + * + * + *
+         * Defaults to [0]. A list of possible return values that the program
+         * can return to indicate a success.
+         * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return A list containing the allowedExitCodes. + */ + @java.lang.Override + public java.util.List getAllowedExitCodesList() { + return allowedExitCodes_; + } + /** + * + * + *
+         * Defaults to [0]. A list of possible return values that the program
+         * can return to indicate a success.
+         * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return The count of allowedExitCodes. + */ + public int getAllowedExitCodesCount() { + return allowedExitCodes_.size(); + } + /** + * + * + *
+         * Defaults to [0]. A list of possible return values that the program
+         * can return to indicate a success.
+         * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + public int getAllowedExitCodes(int index) { + return allowedExitCodes_.getInt(index); + } + + private int allowedExitCodesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (locationTypeCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, locationType_); + } + if (locationTypeCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, locationType_); + } + for (int i = 0; i < args_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i)); + } + if (getAllowedExitCodesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(allowedExitCodesMemoizedSerializedSize); + } + for (int i = 0; i < allowedExitCodes_.size(); i++) { + output.writeInt32NoTag(allowedExitCodes_.getInt(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationTypeCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, locationType_); + } + if (locationTypeCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, locationType_); + } + { + int dataSize = 0; + for (int i = 0; i < args_.size(); i++) { + dataSize += computeStringSizeNoTag(args_.getRaw(i)); + } + size += dataSize; + size += 1 * getArgsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedExitCodes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + allowedExitCodes_.getInt(i)); + } + size += dataSize; + if (!getAllowedExitCodesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + allowedExitCodesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) obj; + + if (!getArgsList().equals(other.getArgsList())) return false; + if (!getAllowedExitCodesList().equals(other.getAllowedExitCodesList())) return false; + if (!getLocationTypeCase().equals(other.getLocationTypeCase())) return false; + switch (locationTypeCase_) { + case 1: + if (!getArtifactId().equals(other.getArtifactId())) return false; + break; + case 2: + if (!getLocalPath().equals(other.getLocalPath())) 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 (getArgsCount() > 0) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + getArgsList().hashCode(); + } + if (getAllowedExitCodesCount() > 0) { + hash = (37 * hash) + ALLOWED_EXIT_CODES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedExitCodesList().hashCode(); + } + switch (locationTypeCase_) { + case 1: + hash = (37 * hash) + ARTIFACT_ID_FIELD_NUMBER; + hash = (53 * hash) + getArtifactId().hashCode(); + break; + case 2: + hash = (37 * hash) + LOCAL_PATH_FIELD_NUMBER; + hash = (53 * hash) + getLocalPath().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile 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; + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile.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(); + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + allowedExitCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + locationTypeCase_ = 0; + locationType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile( + this); + int from_bitField0_ = bitField0_; + if (locationTypeCase_ == 1) { + result.locationType_ = locationType_; + } + if (locationTypeCase_ == 2) { + result.locationType_ = locationType_; + } + if (((bitField0_ & 0x00000001) != 0)) { + args_ = args_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.args_ = args_; + if (((bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.allowedExitCodes_ = allowedExitCodes_; + result.locationTypeCase_ = locationTypeCase_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance()) return this; + if (!other.args_.isEmpty()) { + if (args_.isEmpty()) { + args_ = other.args_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArgsIsMutable(); + args_.addAll(other.args_); + } + onChanged(); + } + if (!other.allowedExitCodes_.isEmpty()) { + if (allowedExitCodes_.isEmpty()) { + allowedExitCodes_ = other.allowedExitCodes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.addAll(other.allowedExitCodes_); + } + onChanged(); + } + switch (other.getLocationTypeCase()) { + case ARTIFACT_ID: + { + locationTypeCase_ = 1; + locationType_ = other.locationType_; + onChanged(); + break; + } + case LOCAL_PATH: + { + locationTypeCase_ = 2; + locationType_ = other.locationType_; + onChanged(); + break; + } + case LOCATIONTYPE_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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int locationTypeCase_ = 0; + private java.lang.Object locationType_; + + public LocationTypeCase getLocationTypeCase() { + return LocationTypeCase.forNumber(locationTypeCase_); + } + + public Builder clearLocationType() { + locationTypeCase_ = 0; + locationType_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+           * The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1; + * + * @return Whether the artifactId field is set. + */ + @java.lang.Override + public boolean hasArtifactId() { + return locationTypeCase_ == 1; + } + /** + * + * + *
+           * The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1; + * + * @return The artifactId. + */ + @java.lang.Override + public java.lang.String getArtifactId() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationTypeCase_ == 1) { + locationType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1; + * + * @return The bytes for artifactId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactIdBytes() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 1) { + ref = locationType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationTypeCase_ == 1) { + locationType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1; + * + * @param value The artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationTypeCase_ = 1; + locationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearArtifactId() { + if (locationTypeCase_ == 1) { + locationTypeCase_ = 0; + locationType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+           * The id of the relevant artifact in the recipe.
+           * 
+ * + * string artifact_id = 1; + * + * @param value The bytes for artifactId to set. + * @return This builder for chaining. + */ + public Builder setArtifactIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationTypeCase_ = 1; + locationType_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+           * The absolute path of the file on the local filesystem.
+           * 
+ * + * string local_path = 2; + * + * @return Whether the localPath field is set. + */ + @java.lang.Override + public boolean hasLocalPath() { + return locationTypeCase_ == 2; + } + /** + * + * + *
+           * The absolute path of the file on the local filesystem.
+           * 
+ * + * string local_path = 2; + * + * @return The localPath. + */ + @java.lang.Override + public java.lang.String getLocalPath() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 2) { + ref = locationType_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationTypeCase_ == 2) { + locationType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The absolute path of the file on the local filesystem.
+           * 
+ * + * string local_path = 2; + * + * @return The bytes for localPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocalPathBytes() { + java.lang.Object ref = ""; + if (locationTypeCase_ == 2) { + ref = locationType_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationTypeCase_ == 2) { + locationType_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The absolute path of the file on the local filesystem.
+           * 
+ * + * string local_path = 2; + * + * @param value The localPath to set. + * @return This builder for chaining. + */ + public Builder setLocalPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationTypeCase_ = 2; + locationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * The absolute path of the file on the local filesystem.
+           * 
+ * + * string local_path = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocalPath() { + if (locationTypeCase_ == 2) { + locationTypeCase_ = 0; + locationType_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+           * The absolute path of the file on the local filesystem.
+           * 
+ * + * string local_path = 2; + * + * @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); + locationTypeCase_ = 2; + locationType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList args_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureArgsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + args_ = new com.google.protobuf.LazyStringArrayList(args_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @return A list containing the args. + */ + public com.google.protobuf.ProtocolStringList getArgsList() { + return args_.getUnmodifiableView(); + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @return The count of args. + */ + public int getArgsCount() { + return args_.size(); + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @param index The index of the element to return. + * @return The args at the given index. + */ + public java.lang.String getArgs(int index) { + return args_.get(index); + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @param index The index of the value to return. + * @return The bytes of the args at the given index. + */ + public com.google.protobuf.ByteString getArgsBytes(int index) { + return args_.getByteString(index); + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @param index The index to set the value at. + * @param value The args to set. + * @return This builder for chaining. + */ + public Builder setArgs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @param value The args to add. + * @return This builder for chaining. + */ + public Builder addArgs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @param values The args to add. + * @return This builder for chaining. + */ + public Builder addAllArgs(java.lang.Iterable values) { + ensureArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_); + onChanged(); + return this; + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @return This builder for chaining. + */ + public Builder clearArgs() { + args_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+           * Arguments to be passed to the provided executable.
+           * 
+ * + * repeated string args = 3; + * + * @param value The bytes of the args to add. + * @return This builder for chaining. + */ + public Builder addArgsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArgsIsMutable(); + args_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList allowedExitCodes_ = emptyIntList(); + + private void ensureAllowedExitCodesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + allowedExitCodes_ = mutableCopy(allowedExitCodes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return A list containing the allowedExitCodes. + */ + public java.util.List getAllowedExitCodesList() { + return ((bitField0_ & 0x00000002) != 0) + ? java.util.Collections.unmodifiableList(allowedExitCodes_) + : allowedExitCodes_; + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return The count of allowedExitCodes. + */ + public int getAllowedExitCodesCount() { + return allowedExitCodes_.size(); + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + public int getAllowedExitCodes(int index) { + return allowedExitCodes_.getInt(index); + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @param index The index to set the value at. + * @param value The allowedExitCodes to set. + * @return This builder for chaining. + */ + public Builder setAllowedExitCodes(int index, int value) { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @param value The allowedExitCodes to add. + * @return This builder for chaining. + */ + public Builder addAllowedExitCodes(int value) { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @param values The allowedExitCodes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedExitCodes( + java.lang.Iterable values) { + ensureAllowedExitCodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedExitCodes_); + onChanged(); + return this; + } + /** + * + * + *
+           * Defaults to [0]. A list of possible return values that the program
+           * can return to indicate a success.
+           * 
+ * + * repeated int32 allowed_exit_codes = 4; + * + * @return This builder for chaining. + */ + public Builder clearAllowedExitCodes() { + allowedExitCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + 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.v1beta.SoftwareRecipe.Step.ExecFile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFile + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExecFile(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.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RunScriptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * Required. The shell script to be executed.
+         * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The script. + */ + java.lang.String getScript(); + /** + * + * + *
+         * Required. The shell script to be executed.
+         * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for script. + */ + com.google.protobuf.ByteString getScriptBytes(); + + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return A list containing the allowedExitCodes. + */ + java.util.List getAllowedExitCodesList(); + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return The count of allowedExitCodes. + */ + int getAllowedExitCodesCount(); + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + int getAllowedExitCodes(int index); + + /** + * + * + *
+         * The script interpreter to use to run the script. If no interpreter is
+         * specified the script is executed directly, which likely
+         * only succeed for scripts with
+         * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @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 is executed directly, which likely
+         * only succeed for scripts with
+         * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @return The interpreter. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.Interpreter + getInterpreter(); + } + /** + * + * + *
+       * Runs a script through an interpreter.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript} + */ + public static final class RunScript extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript) + RunScriptOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunScript.newBuilder() to construct. + private RunScript(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunScript() { + script_ = ""; + allowedExitCodes_ = emptyIntList(); + interpreter_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunScript(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunScript( + 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(); + + script_ = s; + break; + } + case 16: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedExitCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + allowedExitCodes_.addInt(input.readInt32()); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) + && input.getBytesUntilLimit() > 0) { + allowedExitCodes_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + allowedExitCodes_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 24: + { + 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)) { + allowedExitCodes_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Builder.class); + } + + /** + * + * + *
+         * The interpreter used to execute a script.
+         * 
+ * + * Protobuf enum {@code + * google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter} + */ + public enum Interpreter implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+           * Default value for ScriptType.
+           * 
+ * + * 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 script is run with powershell.
+           * 
+ * + * POWERSHELL = 3; + */ + POWERSHELL(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+           * Default value for ScriptType.
+           * 
+ * + * 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 script is run with powershell.
+           * 
+ * + * POWERSHELL = 3; + */ + public static final int POWERSHELL_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 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 3: + 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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .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.v1beta.SoftwareRecipe.Step.RunScript.Interpreter) + } + + public static final int SCRIPT_FIELD_NUMBER = 1; + private volatile java.lang.Object script_; + /** + * + * + *
+         * Required. The shell script to be executed.
+         * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The script. + */ + @java.lang.Override + public java.lang.String getScript() { + java.lang.Object ref = script_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + script_ = s; + return s; + } + } + /** + * + * + *
+         * Required. The shell script to be executed.
+         * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for script. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = script_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + script_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_EXIT_CODES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.IntList allowedExitCodes_; + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return A list containing the allowedExitCodes. + */ + @java.lang.Override + public java.util.List getAllowedExitCodesList() { + return allowedExitCodes_; + } + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return The count of allowedExitCodes. + */ + public int getAllowedExitCodesCount() { + return allowedExitCodes_.size(); + } + /** + * + * + *
+         * Return codes that indicate that the software installed or updated
+         * successfully. Behaviour defaults to [0]
+         * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + public int getAllowedExitCodes(int index) { + return allowedExitCodes_.getInt(index); + } + + private int allowedExitCodesMemoizedSerializedSize = -1; + + public static final int INTERPRETER_FIELD_NUMBER = 3; + private int interpreter_; + /** + * + * + *
+         * The script interpreter to use to run the script. If no interpreter is
+         * specified the script is executed directly, which likely
+         * only succeed for scripts with
+         * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @return The enum numeric value on the wire for interpreter. + */ + @java.lang.Override + public int getInterpreterValue() { + return interpreter_; + } + /** + * + * + *
+         * The script interpreter to use to run the script. If no interpreter is
+         * specified the script is executed directly, which likely
+         * only succeed for scripts with
+         * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @return The interpreter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter + getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.Interpreter + result = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter.valueOf(interpreter_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .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 (!getScriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, script_); + } + if (getAllowedExitCodesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(allowedExitCodesMemoizedSerializedSize); + } + for (int i = 0; i < allowedExitCodes_.size(); i++) { + output.writeInt32NoTag(allowedExitCodes_.getInt(i)); + } + if (interpreter_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter.INTERPRETER_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, interpreter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getScriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, script_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedExitCodes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + allowedExitCodes_.getInt(i)); + } + size += dataSize; + if (!getAllowedExitCodesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + allowedExitCodesMemoizedSerializedSize = dataSize; + } + if (interpreter_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter.INTERPRETER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) obj; + + if (!getScript().equals(other.getScript())) return false; + if (!getAllowedExitCodesList().equals(other.getAllowedExitCodesList())) return false; + if (interpreter_ != other.interpreter_) 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) + SCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getScript().hashCode(); + if (getAllowedExitCodesCount() > 0) { + hash = (37 * hash) + ALLOWED_EXIT_CODES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedExitCodesList().hashCode(); + } + hash = (37 * hash) + INTERPRETER_FIELD_NUMBER; + hash = (53 * hash) + interpreter_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + 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; + } + /** + * + * + *
+         * Runs a script through an interpreter.
+         * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.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(); + script_ = ""; + + allowedExitCodes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + interpreter_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript( + this); + int from_bitField0_ = bitField0_; + result.script_ = script_; + if (((bitField0_ & 0x00000001) != 0)) { + allowedExitCodes_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedExitCodes_ = allowedExitCodes_; + result.interpreter_ = interpreter_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance()) return this; + if (!other.getScript().isEmpty()) { + script_ = other.script_; + onChanged(); + } + if (!other.allowedExitCodes_.isEmpty()) { + if (allowedExitCodes_.isEmpty()) { + allowedExitCodes_ = other.allowedExitCodes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.addAll(other.allowedExitCodes_); + } + onChanged(); + } + if (other.interpreter_ != 0) { + setInterpreterValue(other.getInterpreterValue()); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object script_ = ""; + /** + * + * + *
+           * Required. The shell script to be executed.
+           * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The script. + */ + public java.lang.String getScript() { + java.lang.Object ref = script_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + script_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * Required. The shell script to be executed.
+           * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for script. + */ + public com.google.protobuf.ByteString getScriptBytes() { + java.lang.Object ref = script_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + script_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * Required. The shell script to be executed.
+           * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The script to set. + * @return This builder for chaining. + */ + public Builder setScript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + script_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The shell script to be executed.
+           * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearScript() { + + script_ = getDefaultInstance().getScript(); + onChanged(); + return this; + } + /** + * + * + *
+           * Required. The shell script to be executed.
+           * 
+ * + * string script = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for script to set. + * @return This builder for chaining. + */ + public Builder setScriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + script_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList allowedExitCodes_ = emptyIntList(); + + private void ensureAllowedExitCodesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedExitCodes_ = mutableCopy(allowedExitCodes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return A list containing the allowedExitCodes. + */ + public java.util.List getAllowedExitCodesList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(allowedExitCodes_) + : allowedExitCodes_; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return The count of allowedExitCodes. + */ + public int getAllowedExitCodesCount() { + return allowedExitCodes_.size(); + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @param index The index of the element to return. + * @return The allowedExitCodes at the given index. + */ + public int getAllowedExitCodes(int index) { + return allowedExitCodes_.getInt(index); + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @param index The index to set the value at. + * @param value The allowedExitCodes to set. + * @return This builder for chaining. + */ + public Builder setAllowedExitCodes(int index, int value) { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.setInt(index, value); + onChanged(); + return this; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @param value The allowedExitCodes to add. + * @return This builder for chaining. + */ + public Builder addAllowedExitCodes(int value) { + ensureAllowedExitCodesIsMutable(); + allowedExitCodes_.addInt(value); + onChanged(); + return this; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @param values The allowedExitCodes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedExitCodes( + java.lang.Iterable values) { + ensureAllowedExitCodesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedExitCodes_); + onChanged(); + return this; + } + /** + * + * + *
+           * Return codes that indicate that the software installed or updated
+           * successfully. Behaviour defaults to [0]
+           * 
+ * + * repeated int32 allowed_exit_codes = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowedExitCodes() { + allowedExitCodes_ = 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 is executed directly, which likely
+           * only succeed for scripts with
+           * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @return The enum numeric value on the wire for interpreter. + */ + @java.lang.Override + public int getInterpreterValue() { + return interpreter_; + } + /** + * + * + *
+           * The script interpreter to use to run the script. If no interpreter is
+           * specified the script is executed directly, which likely
+           * only succeed for scripts with
+           * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @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 is executed directly, which likely
+           * only succeed for scripts with
+           * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @return The interpreter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter + getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.Interpreter + result = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter.valueOf(interpreter_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Interpreter.UNRECOGNIZED + : result; + } + /** + * + * + *
+           * The script interpreter to use to run the script. If no interpreter is
+           * specified the script is executed directly, which likely
+           * only succeed for scripts with
+           * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @param value The interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreter( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .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 is executed directly, which likely
+           * only succeed for scripts with
+           * [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
+           * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript.Interpreter interpreter = 3; + * + * + * @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.v1beta.SoftwareRecipe.Step.RunScript) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScript + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunScript parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunScript(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.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int stepCase_ = 0; + private java.lang.Object step_; + + public enum StepCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FILE_COPY(1), + ARCHIVE_EXTRACTION(2), + MSI_INSTALLATION(3), + DPKG_INSTALLATION(4), + RPM_INSTALLATION(5), + FILE_EXEC(6), + SCRIPT_RUN(7), + STEP_NOT_SET(0); + private final int value; + + private StepCase(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 StepCase valueOf(int value) { + return forNumber(value); + } + + public static StepCase forNumber(int value) { + switch (value) { + case 1: + return FILE_COPY; + case 2: + return ARCHIVE_EXTRACTION; + case 3: + return MSI_INSTALLATION; + case 4: + return DPKG_INSTALLATION; + case 5: + return RPM_INSTALLATION; + case 6: + return FILE_EXEC; + case 7: + return SCRIPT_RUN; + case 0: + return STEP_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StepCase getStepCase() { + return StepCase.forNumber(stepCase_); + } + + public static final int FILE_COPY_FIELD_NUMBER = 1; + /** + * + * + *
+       * Copies a file onto the instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + * + * @return Whether the fileCopy field is set. + */ + @java.lang.Override + public boolean hasFileCopy() { + return stepCase_ == 1; + } + /** + * + * + *
+       * Copies a file onto the instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + * + * @return The fileCopy. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + getFileCopy() { + if (stepCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } + /** + * + * + *
+       * Copies a file onto the instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFileOrBuilder + getFileCopyOrBuilder() { + if (stepCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } + + public static final int ARCHIVE_EXTRACTION_FIELD_NUMBER = 2; + /** + * + * + *
+       * Extracts an archive into the specified directory.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + * + * @return Whether the archiveExtraction field is set. + */ + @java.lang.Override + public boolean hasArchiveExtraction() { + return stepCase_ == 2; + } + /** + * + * + *
+       * Extracts an archive into the specified directory.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + * + * @return The archiveExtraction. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + getArchiveExtraction() { + if (stepCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } + /** + * + * + *
+       * Extracts an archive into the specified directory.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchiveOrBuilder + getArchiveExtractionOrBuilder() { + if (stepCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } + + public static final int MSI_INSTALLATION_FIELD_NUMBER = 3; + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + * + * @return Whether the msiInstallation field is set. + */ + @java.lang.Override + public boolean hasMsiInstallation() { + return stepCase_ == 3; + } + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + * + * @return The msiInstallation. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + getMsiInstallation() { + if (stepCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } + /** + * + * + *
+       * Installs an MSI file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsiOrBuilder + getMsiInstallationOrBuilder() { + if (stepCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } + + public static final int DPKG_INSTALLATION_FIELD_NUMBER = 4; + /** + * + * + *
+       * Installs a deb file via dpkg.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + * + * @return Whether the dpkgInstallation field is set. + */ + @java.lang.Override + public boolean hasDpkgInstallation() { + return stepCase_ == 4; + } + /** + * + * + *
+       * Installs a deb file via dpkg.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + * + * @return The dpkgInstallation. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + getDpkgInstallation() { + if (stepCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } + /** + * + * + *
+       * Installs a deb file via dpkg.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkgOrBuilder + getDpkgInstallationOrBuilder() { + if (stepCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } + + public static final int RPM_INSTALLATION_FIELD_NUMBER = 5; + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + * + * @return Whether the rpmInstallation field is set. + */ + @java.lang.Override + public boolean hasRpmInstallation() { + return stepCase_ == 5; + } + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + * + * @return The rpmInstallation. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + getRpmInstallation() { + if (stepCase_ == 5) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } + /** + * + * + *
+       * Installs an rpm file via the rpm utility.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpmOrBuilder + getRpmInstallationOrBuilder() { + if (stepCase_ == 5) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } + + public static final int FILE_EXEC_FIELD_NUMBER = 6; + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + * + * @return Whether the fileExec field is set. + */ + @java.lang.Override + public boolean hasFileExec() { + return stepCase_ == 6; + } + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + * + * @return The fileExec. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + getFileExec() { + if (stepCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } + /** + * + * + *
+       * Executes an artifact or local file.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFileOrBuilder + getFileExecOrBuilder() { + if (stepCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } + + public static final int SCRIPT_RUN_FIELD_NUMBER = 7; + /** + * + * + *
+       * Runs commands in a shell.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + * + * @return Whether the scriptRun field is set. + */ + @java.lang.Override + public boolean hasScriptRun() { + return stepCase_ == 7; + } + /** + * + * + *
+       * Runs commands in a shell.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + * + * @return The scriptRun. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + getScriptRun() { + if (stepCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } + /** + * + * + *
+       * Runs commands in a shell.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder + getScriptRunOrBuilder() { + if (stepCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (stepCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) step_); + } + if (stepCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive) + step_); + } + if (stepCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_); + } + if (stepCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + step_); + } + if (stepCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_); + } + if (stepCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) step_); + } + if (stepCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) step_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stepCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + step_); + } + if (stepCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_); + } + if (stepCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_); + } + if (stepCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + step_); + } + if (stepCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_); + } + if (stepCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + step_); + } + if (stepCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + step_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe.Step)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step) obj; + + if (!getStepCase().equals(other.getStepCase())) return false; + switch (stepCase_) { + case 1: + if (!getFileCopy().equals(other.getFileCopy())) return false; + break; + case 2: + if (!getArchiveExtraction().equals(other.getArchiveExtraction())) return false; + break; + case 3: + if (!getMsiInstallation().equals(other.getMsiInstallation())) return false; + break; + case 4: + if (!getDpkgInstallation().equals(other.getDpkgInstallation())) return false; + break; + case 5: + if (!getRpmInstallation().equals(other.getRpmInstallation())) return false; + break; + case 6: + if (!getFileExec().equals(other.getFileExec())) return false; + break; + case 7: + if (!getScriptRun().equals(other.getScriptRun())) 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 (stepCase_) { + case 1: + hash = (37 * hash) + FILE_COPY_FIELD_NUMBER; + hash = (53 * hash) + getFileCopy().hashCode(); + break; + case 2: + hash = (37 * hash) + ARCHIVE_EXTRACTION_FIELD_NUMBER; + hash = (53 * hash) + getArchiveExtraction().hashCode(); + break; + case 3: + hash = (37 * hash) + MSI_INSTALLATION_FIELD_NUMBER; + hash = (53 * hash) + getMsiInstallation().hashCode(); + break; + case 4: + hash = (37 * hash) + DPKG_INSTALLATION_FIELD_NUMBER; + hash = (53 * hash) + getDpkgInstallation().hashCode(); + break; + case 5: + hash = (37 * hash) + RPM_INSTALLATION_FIELD_NUMBER; + hash = (53 * hash) + getRpmInstallation().hashCode(); + break; + case 6: + hash = (37 * hash) + FILE_EXEC_FIELD_NUMBER; + hash = (53 * hash) + getFileExec().hashCode(); + break; + case 7: + hash = (37 * hash) + SCRIPT_RUN_FIELD_NUMBER; + hash = (53 * hash) + getScriptRun().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * An action that can be taken as part of installing or updating a recipe.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe.Step} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe.Step) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + stepCase_ = 0; + step_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step(this); + if (stepCase_ == 1) { + if (fileCopyBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = fileCopyBuilder_.build(); + } + } + if (stepCase_ == 2) { + if (archiveExtractionBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = archiveExtractionBuilder_.build(); + } + } + if (stepCase_ == 3) { + if (msiInstallationBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = msiInstallationBuilder_.build(); + } + } + if (stepCase_ == 4) { + if (dpkgInstallationBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = dpkgInstallationBuilder_.build(); + } + } + if (stepCase_ == 5) { + if (rpmInstallationBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = rpmInstallationBuilder_.build(); + } + } + if (stepCase_ == 6) { + if (fileExecBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = fileExecBuilder_.build(); + } + } + if (stepCase_ == 7) { + if (scriptRunBuilder_ == null) { + result.step_ = step_; + } else { + result.step_ = scriptRunBuilder_.build(); + } + } + result.stepCase_ = stepCase_; + 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.v1beta.GuestPolicies.SoftwareRecipe.Step) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .getDefaultInstance()) return this; + switch (other.getStepCase()) { + case FILE_COPY: + { + mergeFileCopy(other.getFileCopy()); + break; + } + case ARCHIVE_EXTRACTION: + { + mergeArchiveExtraction(other.getArchiveExtraction()); + break; + } + case MSI_INSTALLATION: + { + mergeMsiInstallation(other.getMsiInstallation()); + break; + } + case DPKG_INSTALLATION: + { + mergeDpkgInstallation(other.getDpkgInstallation()); + break; + } + case RPM_INSTALLATION: + { + mergeRpmInstallation(other.getRpmInstallation()); + break; + } + case FILE_EXEC: + { + mergeFileExec(other.getFileExec()); + break; + } + case SCRIPT_RUN: + { + mergeScriptRun(other.getScriptRun()); + break; + } + case STEP_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.v1beta.GuestPolicies.SoftwareRecipe.Step parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int stepCase_ = 0; + private java.lang.Object step_; + + public StepCase getStepCase() { + return StepCase.forNumber(stepCase_); + } + + public Builder clearStep() { + stepCase_ = 0; + step_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFileOrBuilder> + fileCopyBuilder_; + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + * + * @return Whether the fileCopy field is set. + */ + @java.lang.Override + public boolean hasFileCopy() { + return stepCase_ == 1; + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + * + * @return The fileCopy. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + getFileCopy() { + if (fileCopyBuilder_ == null) { + if (stepCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } else { + if (stepCase_ == 1) { + return fileCopyBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + public Builder setFileCopy( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile value) { + if (fileCopyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + fileCopyBuilder_.setMessage(value); + } + stepCase_ = 1; + return this; + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + public Builder setFileCopy( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile.Builder + builderForValue) { + if (fileCopyBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + fileCopyBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 1; + return this; + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + public Builder mergeFileCopy( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile value) { + if (fileCopyBuilder_ == null) { + if (stepCase_ == 1 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFile) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 1) { + fileCopyBuilder_.mergeFrom(value); + } + fileCopyBuilder_.setMessage(value); + } + stepCase_ = 1; + return this; + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + public Builder clearFileCopy() { + if (fileCopyBuilder_ == null) { + if (stepCase_ == 1) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 1) { + stepCase_ = 0; + step_ = null; + } + fileCopyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile.Builder + getFileCopyBuilder() { + return getFileCopyFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFileOrBuilder + getFileCopyOrBuilder() { + if ((stepCase_ == 1) && (fileCopyBuilder_ != null)) { + return fileCopyBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Copies a file onto the instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.CopyFile file_copy = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFileOrBuilder> + getFileCopyFieldBuilder() { + if (fileCopyBuilder_ == null) { + if (!(stepCase_ == 1)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .getDefaultInstance(); + } + fileCopyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .CopyFileOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.CopyFile) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 1; + onChanged(); + ; + return fileCopyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchiveOrBuilder> + archiveExtractionBuilder_; + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + * + * @return Whether the archiveExtraction field is set. + */ + @java.lang.Override + public boolean hasArchiveExtraction() { + return stepCase_ == 2; + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + * + * @return The archiveExtraction. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + getArchiveExtraction() { + if (archiveExtractionBuilder_ == null) { + if (stepCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } else { + if (stepCase_ == 2) { + return archiveExtractionBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + public Builder setArchiveExtraction( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + value) { + if (archiveExtractionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + archiveExtractionBuilder_.setMessage(value); + } + stepCase_ = 2; + return this; + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + public Builder setArchiveExtraction( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .Builder + builderForValue) { + if (archiveExtractionBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + archiveExtractionBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 2; + return this; + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + public Builder mergeArchiveExtraction( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + value) { + if (archiveExtractionBuilder_ == null) { + if (stepCase_ == 2 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive.getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 2) { + archiveExtractionBuilder_.mergeFrom(value); + } + archiveExtractionBuilder_.setMessage(value); + } + stepCase_ = 2; + return this; + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + public Builder clearArchiveExtraction() { + if (archiveExtractionBuilder_ == null) { + if (stepCase_ == 2) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 2) { + stepCase_ = 0; + step_ = null; + } + archiveExtractionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .Builder + getArchiveExtractionBuilder() { + return getArchiveExtractionFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchiveOrBuilder + getArchiveExtractionOrBuilder() { + if ((stepCase_ == 2) && (archiveExtractionBuilder_ != null)) { + return archiveExtractionBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Extracts an archive into the specified directory.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExtractArchive archive_extraction = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchiveOrBuilder> + getArchiveExtractionFieldBuilder() { + if (archiveExtractionBuilder_ == null) { + if (!(stepCase_ == 2)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExtractArchive + .getDefaultInstance(); + } + archiveExtractionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchiveOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExtractArchive) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 2; + onChanged(); + ; + return archiveExtractionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsiOrBuilder> + msiInstallationBuilder_; + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + * + * @return Whether the msiInstallation field is set. + */ + @java.lang.Override + public boolean hasMsiInstallation() { + return stepCase_ == 3; + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + * + * @return The msiInstallation. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + getMsiInstallation() { + if (msiInstallationBuilder_ == null) { + if (stepCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } else { + if (stepCase_ == 3) { + return msiInstallationBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + public Builder setMsiInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi value) { + if (msiInstallationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + msiInstallationBuilder_.setMessage(value); + } + stepCase_ = 3; + return this; + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + public Builder setMsiInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi.Builder + builderForValue) { + if (msiInstallationBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + msiInstallationBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 3; + return this; + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + public Builder mergeMsiInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi value) { + if (msiInstallationBuilder_ == null) { + if (stepCase_ == 3 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsi) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 3) { + msiInstallationBuilder_.mergeFrom(value); + } + msiInstallationBuilder_.setMessage(value); + } + stepCase_ = 3; + return this; + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + public Builder clearMsiInstallation() { + if (msiInstallationBuilder_ == null) { + if (stepCase_ == 3) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 3) { + stepCase_ = 0; + step_ = null; + } + msiInstallationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi.Builder + getMsiInstallationBuilder() { + return getMsiInstallationFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsiOrBuilder + getMsiInstallationOrBuilder() { + if ((stepCase_ == 3) && (msiInstallationBuilder_ != null)) { + return msiInstallationBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 3) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Installs an MSI file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallMsi msi_installation = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsiOrBuilder> + getMsiInstallationFieldBuilder() { + if (msiInstallationBuilder_ == null) { + if (!(stepCase_ == 3)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .getDefaultInstance(); + } + msiInstallationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallMsiOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallMsi) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 3; + onChanged(); + ; + return msiInstallationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkgOrBuilder> + dpkgInstallationBuilder_; + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + * + * @return Whether the dpkgInstallation field is set. + */ + @java.lang.Override + public boolean hasDpkgInstallation() { + return stepCase_ == 4; + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + * + * @return The dpkgInstallation. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + getDpkgInstallation() { + if (dpkgInstallationBuilder_ == null) { + if (stepCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } else { + if (stepCase_ == 4) { + return dpkgInstallationBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + public Builder setDpkgInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg value) { + if (dpkgInstallationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + dpkgInstallationBuilder_.setMessage(value); + } + stepCase_ = 4; + return this; + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + public Builder setDpkgInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg.Builder + builderForValue) { + if (dpkgInstallationBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + dpkgInstallationBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 4; + return this; + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + public Builder mergeDpkgInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg value) { + if (dpkgInstallationBuilder_ == null) { + if (stepCase_ == 4 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg.getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 4) { + dpkgInstallationBuilder_.mergeFrom(value); + } + dpkgInstallationBuilder_.setMessage(value); + } + stepCase_ = 4; + return this; + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + public Builder clearDpkgInstallation() { + if (dpkgInstallationBuilder_ == null) { + if (stepCase_ == 4) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 4) { + stepCase_ = 0; + step_ = null; + } + dpkgInstallationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder + getDpkgInstallationBuilder() { + return getDpkgInstallationFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkgOrBuilder + getDpkgInstallationOrBuilder() { + if ((stepCase_ == 4) && (dpkgInstallationBuilder_ != null)) { + return dpkgInstallationBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 4) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkg) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Installs a deb file via dpkg.
+         * 
+ * + * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallDpkg dpkg_installation = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkgOrBuilder> + getDpkgInstallationFieldBuilder() { + if (dpkgInstallationBuilder_ == null) { + if (!(stepCase_ == 4)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .getDefaultInstance(); + } + dpkgInstallationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallDpkgOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallDpkg) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 4; + onChanged(); + ; + return dpkgInstallationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpmOrBuilder> + rpmInstallationBuilder_; + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + * + * @return Whether the rpmInstallation field is set. + */ + @java.lang.Override + public boolean hasRpmInstallation() { + return stepCase_ == 5; + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + * + * @return The rpmInstallation. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + getRpmInstallation() { + if (rpmInstallationBuilder_ == null) { + if (stepCase_ == 5) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } else { + if (stepCase_ == 5) { + return rpmInstallationBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + public Builder setRpmInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm value) { + if (rpmInstallationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + rpmInstallationBuilder_.setMessage(value); + } + stepCase_ = 5; + return this; + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + public Builder setRpmInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm.Builder + builderForValue) { + if (rpmInstallationBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + rpmInstallationBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 5; + return this; + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + public Builder mergeRpmInstallation( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm value) { + if (rpmInstallationBuilder_ == null) { + if (stepCase_ == 5 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpm) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 5) { + rpmInstallationBuilder_.mergeFrom(value); + } + rpmInstallationBuilder_.setMessage(value); + } + stepCase_ = 5; + return this; + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + public Builder clearRpmInstallation() { + if (rpmInstallationBuilder_ == null) { + if (stepCase_ == 5) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 5) { + stepCase_ = 0; + step_ = null; + } + rpmInstallationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm.Builder + getRpmInstallationBuilder() { + return getRpmInstallationFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpmOrBuilder + getRpmInstallationOrBuilder() { + if ((stepCase_ == 5) && (rpmInstallationBuilder_ != null)) { + return rpmInstallationBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 5) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Installs an rpm file via the rpm utility.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.InstallRpm rpm_installation = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpmOrBuilder> + getRpmInstallationFieldBuilder() { + if (rpmInstallationBuilder_ == null) { + if (!(stepCase_ == 5)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .getDefaultInstance(); + } + rpmInstallationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .InstallRpmOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.InstallRpm) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 5; + onChanged(); + ; + return rpmInstallationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFileOrBuilder> + fileExecBuilder_; + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + * + * @return Whether the fileExec field is set. + */ + @java.lang.Override + public boolean hasFileExec() { + return stepCase_ == 6; + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + * + * @return The fileExec. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + getFileExec() { + if (fileExecBuilder_ == null) { + if (stepCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } else { + if (stepCase_ == 6) { + return fileExecBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + public Builder setFileExec( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile value) { + if (fileExecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + fileExecBuilder_.setMessage(value); + } + stepCase_ = 6; + return this; + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + public Builder setFileExec( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile.Builder + builderForValue) { + if (fileExecBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + fileExecBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 6; + return this; + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + public Builder mergeFileExec( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile value) { + if (fileExecBuilder_ == null) { + if (stepCase_ == 6 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFile) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 6) { + fileExecBuilder_.mergeFrom(value); + } + fileExecBuilder_.setMessage(value); + } + stepCase_ = 6; + return this; + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + public Builder clearFileExec() { + if (fileExecBuilder_ == null) { + if (stepCase_ == 6) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 6) { + stepCase_ = 0; + step_ = null; + } + fileExecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile.Builder + getFileExecBuilder() { + return getFileExecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFileOrBuilder + getFileExecOrBuilder() { + if ((stepCase_ == 6) && (fileExecBuilder_ != null)) { + return fileExecBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Executes an artifact or local file.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.ExecFile file_exec = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFileOrBuilder> + getFileExecFieldBuilder() { + if (fileExecBuilder_ == null) { + if (!(stepCase_ == 6)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .getDefaultInstance(); + } + fileExecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .ExecFileOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.ExecFile) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 6; + onChanged(); + ; + return fileExecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScriptOrBuilder> + scriptRunBuilder_; + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + * + * @return Whether the scriptRun field is set. + */ + @java.lang.Override + public boolean hasScriptRun() { + return stepCase_ == 7; + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + * + * @return The scriptRun. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + getScriptRun() { + if (scriptRunBuilder_ == null) { + if (stepCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } else { + if (stepCase_ == 7) { + return scriptRunBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + public Builder setScriptRun( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript value) { + if (scriptRunBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + step_ = value; + onChanged(); + } else { + scriptRunBuilder_.setMessage(value); + } + stepCase_ = 7; + return this; + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + public Builder setScriptRun( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.Builder + builderForValue) { + if (scriptRunBuilder_ == null) { + step_ = builderForValue.build(); + onChanged(); + } else { + scriptRunBuilder_.setMessage(builderForValue.build()); + } + stepCase_ = 7; + return this; + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + public Builder mergeScriptRun( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript value) { + if (scriptRunBuilder_ == null) { + if (stepCase_ == 7 + && step_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance()) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .newBuilder( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScript) + step_) + .mergeFrom(value) + .buildPartial(); + } else { + step_ = value; + } + onChanged(); + } else { + if (stepCase_ == 7) { + scriptRunBuilder_.mergeFrom(value); + } + scriptRunBuilder_.setMessage(value); + } + stepCase_ = 7; + return this; + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + public Builder clearScriptRun() { + if (scriptRunBuilder_ == null) { + if (stepCase_ == 7) { + stepCase_ = 0; + step_ = null; + onChanged(); + } + } else { + if (stepCase_ == 7) { + stepCase_ = 0; + step_ = null; + } + scriptRunBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript.Builder + getScriptRunBuilder() { + return getScriptRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScriptOrBuilder + getScriptRunOrBuilder() { + if ((stepCase_ == 7) && (scriptRunBuilder_ != null)) { + return scriptRunBuilder_.getMessageOrBuilder(); + } else { + if (stepCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + step_; + } + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } + } + /** + * + * + *
+         * Runs commands in a shell.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe.Step.RunScript script_run = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScriptOrBuilder> + getScriptRunFieldBuilder() { + if (scriptRunBuilder_ == null) { + if (!(stepCase_ == 7)) { + step_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .getDefaultInstance(); + } + scriptRunBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .RunScriptOrBuilder>( + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.RunScript) + step_, + getParentForChildren(), + isClean()); + step_ = null; + } + stepCase_ = 7; + onChanged(); + ; + return scriptRunBuilder_; + } + + @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.v1beta.SoftwareRecipe.Step) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe.Step) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Step(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. Unique identifier for the recipe. Only one recipe with a given name is
+     * installed on an instance.
+     * Names are also used to identify resources which helps to determine whether
+     * guest policies have conflicts. This means that requests to create multiple
+     * recipes with the same name and version are rejected since they
+     * could potentially have conflicting assignments.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Unique identifier for the recipe. Only one recipe with a given name is
+     * installed on an instance.
+     * Names are also used to identify resources which helps to determine whether
+     * guest policies have conflicts. This means that requests to create multiple
+     * recipes with the same name and version are rejected since they
+     * could potentially have conflicting assignments.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + * + * + *
+     * The version of this software recipe. Version can be up to 4 period
+     * separated numbers (e.g. 12.34.56.78).
+     * 
+ * + * string version = 2; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + * + * + *
+     * The version of this software recipe. Version can be up to 4 period
+     * separated numbers (e.g. 12.34.56.78).
+     * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACTS_FIELD_NUMBER = 3; + private java.util.List + artifacts_; + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + @java.lang.Override + public java.util.List + getArtifactsList() { + return artifacts_; + } + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> + getArtifactsOrBuilderList() { + return artifacts_; + } + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + @java.lang.Override + public int getArtifactsCount() { + return artifacts_.size(); + } + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact getArtifacts( + int index) { + return artifacts_.get(index); + } + /** + * + * + *
+     * Resources available to be used in the steps in the recipe.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder + getArtifactsOrBuilder(int index) { + return artifacts_.get(index); + } + + public static final int INSTALL_STEPS_FIELD_NUMBER = 4; + private java.util.List + installSteps_; + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + @java.lang.Override + public java.util.List + getInstallStepsList() { + return installSteps_; + } + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getInstallStepsOrBuilderList() { + return installSteps_; + } + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + @java.lang.Override + public int getInstallStepsCount() { + return installSteps_.size(); + } + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getInstallSteps( + int index) { + return installSteps_.get(index); + } + /** + * + * + *
+     * Actions to be taken for installing this recipe. On failure it stops
+     * executing steps and does not attempt another installation. Any steps taken
+     * (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder + getInstallStepsOrBuilder(int index) { + return installSteps_.get(index); + } + + public static final int UPDATE_STEPS_FIELD_NUMBER = 5; + private java.util.List + updateSteps_; + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + @java.lang.Override + public java.util.List + getUpdateStepsList() { + return updateSteps_; + } + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getUpdateStepsOrBuilderList() { + return updateSteps_; + } + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + @java.lang.Override + public int getUpdateStepsCount() { + return updateSteps_.size(); + } + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getUpdateSteps( + int index) { + return updateSteps_.get(index); + } + /** + * + * + *
+     * Actions to be taken for updating this recipe. On failure it stops
+     * executing steps and  does not attempt another update for this recipe. Any
+     * steps taken (including partially completed steps) are not rolled back.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder + getUpdateStepsOrBuilder(int index) { + return updateSteps_.get(index); + } + + public static final int DESIRED_STATE_FIELD_NUMBER = 6; + private int desiredState_; + /** + * + * + *
+     * Default is INSTALLED. The desired state the agent should maintain for this
+     * recipe.
+     * INSTALLED: The software recipe is installed on the instance but
+     *            won't be updated to new versions.
+     * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+     *                         instance. The recipe is updated to a higher
+     *                         version, if a higher version of the recipe is
+     *                         assigned to this instance.
+     * REMOVE: Remove is unsupported for software recipes and attempts to
+     *         create or update a recipe to the REMOVE state is rejected.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return The enum numeric value on the wire for desiredState. + */ + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; + } + /** + * + * + *
+     * Default is INSTALLED. The desired state the agent should maintain for this
+     * recipe.
+     * INSTALLED: The software recipe is installed on the instance but
+     *            won't be updated to new versions.
+     * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+     *                         instance. The recipe is updated to a higher
+     *                         version, if a higher version of the recipe is
+     *                         assigned to this instance.
+     * REMOVE: Remove is unsupported for software recipes and attempts to
+     *         create or update a recipe to the REMOVE state is rejected.
+     * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return The desiredState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState result = + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.valueOf(desiredState_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + for (int i = 0; i < artifacts_.size(); i++) { + output.writeMessage(3, artifacts_.get(i)); + } + for (int i = 0; i < installSteps_.size(); i++) { + output.writeMessage(4, installSteps_.get(i)); + } + for (int i = 0; i < updateSteps_.size(); i++) { + output.writeMessage(5, updateSteps_.get(i)); + } + if (desiredState_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.DESIRED_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, desiredState_); + } + 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 (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + for (int i = 0; i < artifacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, artifacts_.get(i)); + } + for (int i = 0; i < installSteps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, installSteps_.get(i)); + } + for (int i = 0; i < updateSteps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, updateSteps_.get(i)); + } + if (desiredState_ + != com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.DESIRED_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, desiredState_); + } + 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.v1beta.GuestPolicies.SoftwareRecipe)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getArtifactsList().equals(other.getArtifactsList())) return false; + if (!getInstallStepsList().equals(other.getInstallStepsList())) return false; + if (!getUpdateStepsList().equals(other.getUpdateStepsList())) return false; + if (desiredState_ != other.desiredState_) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getArtifactsCount() > 0) { + hash = (37 * hash) + ARTIFACTS_FIELD_NUMBER; + hash = (53 * hash) + getArtifactsList().hashCode(); + } + if (getInstallStepsCount() > 0) { + hash = (37 * hash) + INSTALL_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getInstallStepsList().hashCode(); + } + if (getUpdateStepsCount() > 0) { + hash = (37 * hash) + UPDATE_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getUpdateStepsList().hashCode(); + } + hash = (37 * hash) + DESIRED_STATE_FIELD_NUMBER; + hash = (53 * hash) + desiredState_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe 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.v1beta.GuestPolicies.SoftwareRecipe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe 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.v1beta.GuestPolicies.SoftwareRecipe parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe 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.v1beta.GuestPolicies.SoftwareRecipe parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe 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.v1beta.GuestPolicies.SoftwareRecipe parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe 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.v1beta.GuestPolicies.SoftwareRecipe 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 software recipe is a set of instructions for installing and configuring a
+     * piece of software. It consists of a set of artifacts that are
+     * downloaded, and a set of steps that install, configure, and/or update the
+     * software.
+     * Recipes support installing and updating software from artifacts in the
+     * following formats:
+     * Zip archive, Tar archive, Windows MSI, Debian package, and RPM package.
+     * Additionally, recipes support executing a script (either defined in a file or
+     * directly in this api) in bash, sh, cmd, and powershell.
+     * Updating a software recipe
+     * If a recipe is assigned to an instance and there is a recipe with the same
+     * name but a lower version already installed and the assigned state
+     * of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to
+     * the new version.
+     * Script Working Directories
+     * Each script or execution step is run in its own temporary directory which
+     * is deleted after completing the step.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.SoftwareRecipe} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.SoftwareRecipe) + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getArtifactsFieldBuilder(); + getInstallStepsFieldBuilder(); + getUpdateStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + version_ = ""; + + if (artifactsBuilder_ == null) { + artifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + artifactsBuilder_.clear(); + } + if (installStepsBuilder_ == null) { + installSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + installStepsBuilder_.clear(); + } + if (updateStepsBuilder_ == null) { + updateSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + updateStepsBuilder_.clear(); + } + desiredState_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.version_ = version_; + if (artifactsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + artifacts_ = java.util.Collections.unmodifiableList(artifacts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.artifacts_ = artifacts_; + } else { + result.artifacts_ = artifactsBuilder_.build(); + } + if (installStepsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + installSteps_ = java.util.Collections.unmodifiableList(installSteps_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.installSteps_ = installSteps_; + } else { + result.installSteps_ = installStepsBuilder_.build(); + } + if (updateStepsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + updateSteps_ = java.util.Collections.unmodifiableList(updateSteps_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.updateSteps_ = updateSteps_; + } else { + result.updateSteps_ = updateStepsBuilder_.build(); + } + result.desiredState_ = desiredState_; + 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.v1beta.GuestPolicies.SoftwareRecipe) { + return mergeFrom((com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (artifactsBuilder_ == null) { + if (!other.artifacts_.isEmpty()) { + if (artifacts_.isEmpty()) { + artifacts_ = other.artifacts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArtifactsIsMutable(); + artifacts_.addAll(other.artifacts_); + } + onChanged(); + } + } else { + if (!other.artifacts_.isEmpty()) { + if (artifactsBuilder_.isEmpty()) { + artifactsBuilder_.dispose(); + artifactsBuilder_ = null; + artifacts_ = other.artifacts_; + bitField0_ = (bitField0_ & ~0x00000001); + artifactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getArtifactsFieldBuilder() + : null; + } else { + artifactsBuilder_.addAllMessages(other.artifacts_); + } + } + } + if (installStepsBuilder_ == null) { + if (!other.installSteps_.isEmpty()) { + if (installSteps_.isEmpty()) { + installSteps_ = other.installSteps_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInstallStepsIsMutable(); + installSteps_.addAll(other.installSteps_); + } + onChanged(); + } + } else { + if (!other.installSteps_.isEmpty()) { + if (installStepsBuilder_.isEmpty()) { + installStepsBuilder_.dispose(); + installStepsBuilder_ = null; + installSteps_ = other.installSteps_; + bitField0_ = (bitField0_ & ~0x00000002); + installStepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstallStepsFieldBuilder() + : null; + } else { + installStepsBuilder_.addAllMessages(other.installSteps_); + } + } + } + if (updateStepsBuilder_ == null) { + if (!other.updateSteps_.isEmpty()) { + if (updateSteps_.isEmpty()) { + updateSteps_ = other.updateSteps_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUpdateStepsIsMutable(); + updateSteps_.addAll(other.updateSteps_); + } + onChanged(); + } + } else { + if (!other.updateSteps_.isEmpty()) { + if (updateStepsBuilder_.isEmpty()) { + updateStepsBuilder_.dispose(); + updateStepsBuilder_ = null; + updateSteps_ = other.updateSteps_; + bitField0_ = (bitField0_ & ~0x00000004); + updateStepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUpdateStepsFieldBuilder() + : null; + } else { + updateStepsBuilder_.addAllMessages(other.updateSteps_); + } + } + } + if (other.desiredState_ != 0) { + setDesiredStateValue(other.getDesiredStateValue()); + } + 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.v1beta.GuestPolicies.SoftwareRecipe parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. Unique identifier for the recipe. Only one recipe with a given name is
+       * installed on an instance.
+       * Names are also used to identify resources which helps to determine whether
+       * guest policies have conflicts. This means that requests to create multiple
+       * recipes with the same name and version are rejected since they
+       * could potentially have conflicting assignments.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Unique identifier for the recipe. Only one recipe with a given name is
+       * installed on an instance.
+       * Names are also used to identify resources which helps to determine whether
+       * guest policies have conflicts. This means that requests to create multiple
+       * recipes with the same name and version are rejected since they
+       * could potentially have conflicting assignments.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Unique identifier for the recipe. Only one recipe with a given name is
+       * installed on an instance.
+       * Names are also used to identify resources which helps to determine whether
+       * guest policies have conflicts. This means that requests to create multiple
+       * recipes with the same name and version are rejected since they
+       * could potentially have conflicting assignments.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Unique identifier for the recipe. Only one recipe with a given name is
+       * installed on an instance.
+       * Names are also used to identify resources which helps to determine whether
+       * guest policies have conflicts. This means that requests to create multiple
+       * recipes with the same name and version are rejected since they
+       * could potentially have conflicting assignments.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Unique identifier for the recipe. Only one recipe with a given name is
+       * installed on an instance.
+       * Names are also used to identify resources which helps to determine whether
+       * guest policies have conflicts. This means that requests to create multiple
+       * recipes with the same name and version are rejected since they
+       * could potentially have conflicting assignments.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + * + * + *
+       * The version of this software recipe. Version can be up to 4 period
+       * separated numbers (e.g. 12.34.56.78).
+       * 
+ * + * string version = 2; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The version of this software recipe. Version can be up to 4 period
+       * separated numbers (e.g. 12.34.56.78).
+       * 
+ * + * string version = 2; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The version of this software recipe. Version can be up to 4 period
+       * separated numbers (e.g. 12.34.56.78).
+       * 
+ * + * string version = 2; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The version of this software recipe. Version can be up to 4 period
+       * separated numbers (e.g. 12.34.56.78).
+       * 
+ * + * string version = 2; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * The version of this software recipe. Version can be up to 4 period
+       * separated numbers (e.g. 12.34.56.78).
+       * 
+ * + * string version = 2; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.util.List + artifacts_ = java.util.Collections.emptyList(); + + private void ensureArtifactsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + artifacts_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact>( + artifacts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> + artifactsBuilder_; + + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public java.util.List + getArtifactsList() { + if (artifactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(artifacts_); + } else { + return artifactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public int getArtifactsCount() { + if (artifactsBuilder_ == null) { + return artifacts_.size(); + } else { + return artifactsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact getArtifacts( + int index) { + if (artifactsBuilder_ == null) { + return artifacts_.get(index); + } else { + return artifactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder setArtifacts( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactsIsMutable(); + artifacts_.set(index, value); + onChanged(); + } else { + artifactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder setArtifacts( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + builderForValue) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.set(index, builderForValue.build()); + onChanged(); + } else { + artifactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder addArtifacts( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactsIsMutable(); + artifacts_.add(value); + onChanged(); + } else { + artifactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder addArtifacts( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact value) { + if (artifactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactsIsMutable(); + artifacts_.add(index, value); + onChanged(); + } else { + artifactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder addArtifacts( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + builderForValue) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.add(builderForValue.build()); + onChanged(); + } else { + artifactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder addArtifacts( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + builderForValue) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.add(index, builderForValue.build()); + onChanged(); + } else { + artifactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder addAllArtifacts( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact> + values) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, artifacts_); + onChanged(); + } else { + artifactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder clearArtifacts() { + if (artifactsBuilder_ == null) { + artifacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + artifactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public Builder removeArtifacts(int index) { + if (artifactsBuilder_ == null) { + ensureArtifactsIsMutable(); + artifacts_.remove(index); + onChanged(); + } else { + artifactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + getArtifactsBuilder(int index) { + return getArtifactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder + getArtifactsOrBuilder(int index) { + if (artifactsBuilder_ == null) { + return artifacts_.get(index); + } else { + return artifactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> + getArtifactsOrBuilderList() { + if (artifactsBuilder_ != null) { + return artifactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(artifacts_); + } + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + addArtifactsBuilder() { + return getArtifactsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .getDefaultInstance()); + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder + addArtifactsBuilder(int index) { + return getArtifactsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact + .getDefaultInstance()); + } + /** + * + * + *
+       * Resources available to be used in the steps in the recipe.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Artifact artifacts = 3; + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder> + getArtifactsBuilderList() { + return getArtifactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder> + getArtifactsFieldBuilder() { + if (artifactsBuilder_ == null) { + artifactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Artifact.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.ArtifactOrBuilder>( + artifacts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + artifacts_ = null; + } + return artifactsBuilder_; + } + + private java.util.List + installSteps_ = java.util.Collections.emptyList(); + + private void ensureInstallStepsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + installSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step>( + installSteps_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + installStepsBuilder_; + + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public java.util.List + getInstallStepsList() { + if (installStepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(installSteps_); + } else { + return installStepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public int getInstallStepsCount() { + if (installStepsBuilder_ == null) { + return installSteps_.size(); + } else { + return installStepsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getInstallSteps( + int index) { + if (installStepsBuilder_ == null) { + return installSteps_.get(index); + } else { + return installStepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder setInstallSteps( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step value) { + if (installStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstallStepsIsMutable(); + installSteps_.set(index, value); + onChanged(); + } else { + installStepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder setInstallSteps( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + builderForValue) { + if (installStepsBuilder_ == null) { + ensureInstallStepsIsMutable(); + installSteps_.set(index, builderForValue.build()); + onChanged(); + } else { + installStepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder addInstallSteps( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step value) { + if (installStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstallStepsIsMutable(); + installSteps_.add(value); + onChanged(); + } else { + installStepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder addInstallSteps( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step value) { + if (installStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstallStepsIsMutable(); + installSteps_.add(index, value); + onChanged(); + } else { + installStepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder addInstallSteps( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + builderForValue) { + if (installStepsBuilder_ == null) { + ensureInstallStepsIsMutable(); + installSteps_.add(builderForValue.build()); + onChanged(); + } else { + installStepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder addInstallSteps( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + builderForValue) { + if (installStepsBuilder_ == null) { + ensureInstallStepsIsMutable(); + installSteps_.add(index, builderForValue.build()); + onChanged(); + } else { + installStepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder addAllInstallSteps( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step> + values) { + if (installStepsBuilder_ == null) { + ensureInstallStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, installSteps_); + onChanged(); + } else { + installStepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder clearInstallSteps() { + if (installStepsBuilder_ == null) { + installSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + installStepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public Builder removeInstallSteps(int index) { + if (installStepsBuilder_ == null) { + ensureInstallStepsIsMutable(); + installSteps_.remove(index); + onChanged(); + } else { + installStepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + getInstallStepsBuilder(int index) { + return getInstallStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder + getInstallStepsOrBuilder(int index) { + if (installStepsBuilder_ == null) { + return installSteps_.get(index); + } else { + return installStepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getInstallStepsOrBuilderList() { + if (installStepsBuilder_ != null) { + return installStepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(installSteps_); + } + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + addInstallStepsBuilder() { + return getInstallStepsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .getDefaultInstance()); + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + addInstallStepsBuilder(int index) { + return getInstallStepsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .getDefaultInstance()); + } + /** + * + * + *
+       * Actions to be taken for installing this recipe. On failure it stops
+       * executing steps and does not attempt another installation. Any steps taken
+       * (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step install_steps = 4; + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder> + getInstallStepsBuilderList() { + return getInstallStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getInstallStepsFieldBuilder() { + if (installStepsBuilder_ == null) { + installStepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder>( + installSteps_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + installSteps_ = null; + } + return installStepsBuilder_; + } + + private java.util.List + updateSteps_ = java.util.Collections.emptyList(); + + private void ensureUpdateStepsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + updateSteps_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step>(updateSteps_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + updateStepsBuilder_; + + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public java.util.List + getUpdateStepsList() { + if (updateStepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(updateSteps_); + } else { + return updateStepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public int getUpdateStepsCount() { + if (updateStepsBuilder_ == null) { + return updateSteps_.size(); + } else { + return updateStepsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step getUpdateSteps( + int index) { + if (updateStepsBuilder_ == null) { + return updateSteps_.get(index); + } else { + return updateStepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder setUpdateSteps( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step value) { + if (updateStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateStepsIsMutable(); + updateSteps_.set(index, value); + onChanged(); + } else { + updateStepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder setUpdateSteps( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + builderForValue) { + if (updateStepsBuilder_ == null) { + ensureUpdateStepsIsMutable(); + updateSteps_.set(index, builderForValue.build()); + onChanged(); + } else { + updateStepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder addUpdateSteps( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step value) { + if (updateStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateStepsIsMutable(); + updateSteps_.add(value); + onChanged(); + } else { + updateStepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder addUpdateSteps( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step value) { + if (updateStepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateStepsIsMutable(); + updateSteps_.add(index, value); + onChanged(); + } else { + updateStepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder addUpdateSteps( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + builderForValue) { + if (updateStepsBuilder_ == null) { + ensureUpdateStepsIsMutable(); + updateSteps_.add(builderForValue.build()); + onChanged(); + } else { + updateStepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder addUpdateSteps( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + builderForValue) { + if (updateStepsBuilder_ == null) { + ensureUpdateStepsIsMutable(); + updateSteps_.add(index, builderForValue.build()); + onChanged(); + } else { + updateStepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder addAllUpdateSteps( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step> + values) { + if (updateStepsBuilder_ == null) { + ensureUpdateStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, updateSteps_); + onChanged(); + } else { + updateStepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder clearUpdateSteps() { + if (updateStepsBuilder_ == null) { + updateSteps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + updateStepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public Builder removeUpdateSteps(int index) { + if (updateStepsBuilder_ == null) { + ensureUpdateStepsIsMutable(); + updateSteps_.remove(index); + onChanged(); + } else { + updateStepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + getUpdateStepsBuilder(int index) { + return getUpdateStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder + getUpdateStepsOrBuilder(int index) { + if (updateStepsBuilder_ == null) { + return updateSteps_.get(index); + } else { + return updateStepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getUpdateStepsOrBuilderList() { + if (updateStepsBuilder_ != null) { + return updateStepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updateSteps_); + } + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + addUpdateStepsBuilder() { + return getUpdateStepsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .getDefaultInstance()); + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder + addUpdateStepsBuilder(int index) { + return getUpdateStepsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step + .getDefaultInstance()); + } + /** + * + * + *
+       * Actions to be taken for updating this recipe. On failure it stops
+       * executing steps and  does not attempt another update for this recipe. Any
+       * steps taken (including partially completed steps) are not rolled back.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.SoftwareRecipe.Step update_steps = 5; + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder> + getUpdateStepsBuilderList() { + return getUpdateStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder> + getUpdateStepsFieldBuilder() { + if (updateStepsBuilder_ == null) { + updateStepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Step.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.StepOrBuilder>( + updateSteps_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + updateSteps_ = null; + } + return updateStepsBuilder_; + } + + private int desiredState_ = 0; + /** + * + * + *
+       * Default is INSTALLED. The desired state the agent should maintain for this
+       * recipe.
+       * INSTALLED: The software recipe is installed on the instance but
+       *            won't be updated to new versions.
+       * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+       *                         instance. The recipe is updated to a higher
+       *                         version, if a higher version of the recipe is
+       *                         assigned to this instance.
+       * REMOVE: Remove is unsupported for software recipes and attempts to
+       *         create or update a recipe to the REMOVE state is rejected.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return The enum numeric value on the wire for desiredState. + */ + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; + } + /** + * + * + *
+       * Default is INSTALLED. The desired state the agent should maintain for this
+       * recipe.
+       * INSTALLED: The software recipe is installed on the instance but
+       *            won't be updated to new versions.
+       * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+       *                         instance. The recipe is updated to a higher
+       *                         version, if a higher version of the recipe is
+       *                         assigned to this instance.
+       * REMOVE: Remove is unsupported for software recipes and attempts to
+       *         create or update a recipe to the REMOVE state is rejected.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @param value The enum numeric value on the wire for desiredState to set. + * @return This builder for chaining. + */ + public Builder setDesiredStateValue(int value) { + + desiredState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Default is INSTALLED. The desired state the agent should maintain for this
+       * recipe.
+       * INSTALLED: The software recipe is installed on the instance but
+       *            won't be updated to new versions.
+       * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+       *                         instance. The recipe is updated to a higher
+       *                         version, if a higher version of the recipe is
+       *                         assigned to this instance.
+       * REMOVE: Remove is unsupported for software recipes and attempts to
+       *         create or update a recipe to the REMOVE state is rejected.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return The desiredState. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState result = + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.valueOf(desiredState_); + return result == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Default is INSTALLED. The desired state the agent should maintain for this
+       * recipe.
+       * INSTALLED: The software recipe is installed on the instance but
+       *            won't be updated to new versions.
+       * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+       *                         instance. The recipe is updated to a higher
+       *                         version, if a higher version of the recipe is
+       *                         assigned to this instance.
+       * REMOVE: Remove is unsupported for software recipes and attempts to
+       *         create or update a recipe to the REMOVE state is rejected.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @param value The desiredState to set. + * @return This builder for chaining. + */ + public Builder setDesiredState( + com.google.cloud.osconfig.v1beta.GuestPolicies.DesiredState value) { + if (value == null) { + throw new NullPointerException(); + } + + desiredState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Default is INSTALLED. The desired state the agent should maintain for this
+       * recipe.
+       * INSTALLED: The software recipe is installed on the instance but
+       *            won't be updated to new versions.
+       * INSTALLED_KEEP_UPDATED: The software recipe is installed on the
+       *                         instance. The recipe is updated to a higher
+       *                         version, if a higher version of the recipe is
+       *                         assigned to this instance.
+       * REMOVE: Remove is unsupported for software recipes and attempts to
+       *         create or update a recipe to the REMOVE state is rejected.
+       * 
+ * + * .google.cloud.osconfig.v1beta.DesiredState desired_state = 6; + * + * @return This builder for chaining. + */ + public Builder clearDesiredState() { + + desiredState_ = 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.v1beta.SoftwareRecipe) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.SoftwareRecipe) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SoftwareRecipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SoftwareRecipe(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.v1beta.GuestPolicies.SoftwareRecipe + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CreateGuestPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.CreateGuestPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the parent using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * 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 using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * Required. The logical name of the guest policy in the project
+     * with the following restrictions:
+     * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The guestPolicyId. + */ + java.lang.String getGuestPolicyId(); + /** + * + * + *
+     * Required. The logical name of the guest policy in the project
+     * with the following restrictions:
+     * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for guestPolicyId. + */ + com.google.protobuf.ByteString getGuestPolicyIdBytes(); + + /** + * + * + *
+     * Required. The GuestPolicy to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the guestPolicy field is set. + */ + boolean hasGuestPolicy(); + /** + * + * + *
+     * Required. The GuestPolicy to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The guestPolicy. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy(); + /** + * + * + *
+     * Required. The GuestPolicy to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder getGuestPolicyOrBuilder(); + } + /** + * + * + *
+   * A request message for creating a guest policy.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.CreateGuestPolicyRequest} + */ + public static final class CreateGuestPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.CreateGuestPolicyRequest) + CreateGuestPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateGuestPolicyRequest.newBuilder() to construct. + private CreateGuestPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateGuestPolicyRequest() { + parent_ = ""; + guestPolicyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateGuestPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateGuestPolicyRequest( + 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(); + + guestPolicyId_ = s; + break; + } + case 26: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder subBuilder = + null; + if (guestPolicy_ != null) { + subBuilder = guestPolicy_.toBuilder(); + } + guestPolicy_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(guestPolicy_); + guestPolicy_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The resource name of the parent using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the parent using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GUEST_POLICY_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object guestPolicyId_; + /** + * + * + *
+     * Required. The logical name of the guest policy in the project
+     * with the following restrictions:
+     * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The guestPolicyId. + */ + @java.lang.Override + public java.lang.String getGuestPolicyId() { + java.lang.Object ref = guestPolicyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guestPolicyId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The logical name of the guest policy in the project
+     * with the following restrictions:
+     * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for guestPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGuestPolicyIdBytes() { + java.lang.Object ref = guestPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + guestPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GUEST_POLICY_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy guestPolicy_; + /** + * + * + *
+     * Required. The GuestPolicy to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the guestPolicy field is set. + */ + @java.lang.Override + public boolean hasGuestPolicy() { + return guestPolicy_ != null; + } + /** + * + * + *
+     * Required. The GuestPolicy to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The guestPolicy. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy() { + return guestPolicy_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance() + : guestPolicy_; + } + /** + * + * + *
+     * Required. The GuestPolicy to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder + getGuestPolicyOrBuilder() { + return getGuestPolicy(); + } + + 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 (!getGuestPolicyIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, guestPolicyId_); + } + if (guestPolicy_ != null) { + output.writeMessage(3, getGuestPolicy()); + } + 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 (!getGuestPolicyIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, guestPolicyId_); + } + if (guestPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGuestPolicy()); + } + 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.v1beta.GuestPolicies.CreateGuestPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getGuestPolicyId().equals(other.getGuestPolicyId())) return false; + if (hasGuestPolicy() != other.hasGuestPolicy()) return false; + if (hasGuestPolicy()) { + if (!getGuestPolicy().equals(other.getGuestPolicy())) 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) + GUEST_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getGuestPolicyId().hashCode(); + if (hasGuestPolicy()) { + hash = (37 * hash) + GUEST_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getGuestPolicy().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest 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.v1beta.GuestPolicies.CreateGuestPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest 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.v1beta.GuestPolicies.CreateGuestPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest 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.v1beta.GuestPolicies.CreateGuestPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + 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.v1beta.GuestPolicies.CreateGuestPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest 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.v1beta.GuestPolicies.CreateGuestPolicyRequest 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 guest policy.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.CreateGuestPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.CreateGuestPolicyRequest) + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest.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_ = ""; + + guestPolicyId_ = ""; + + if (guestPolicyBuilder_ == null) { + guestPolicy_ = null; + } else { + guestPolicy_ = null; + guestPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest(this); + result.parent_ = parent_; + result.guestPolicyId_ = guestPolicyId_; + if (guestPolicyBuilder_ == null) { + result.guestPolicy_ = guestPolicy_; + } else { + result.guestPolicy_ = guestPolicyBuilder_.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.v1beta.GuestPolicies.CreateGuestPolicyRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getGuestPolicyId().isEmpty()) { + guestPolicyId_ = other.guestPolicyId_; + onChanged(); + } + if (other.hasGuestPolicy()) { + mergeGuestPolicy(other.getGuestPolicy()); + } + 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.v1beta.GuestPolicies.CreateGuestPolicyRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest) + 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 guestPolicyId_ = ""; + /** + * + * + *
+       * Required. The logical name of the guest policy in the project
+       * with the following restrictions:
+       * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The guestPolicyId. + */ + public java.lang.String getGuestPolicyId() { + java.lang.Object ref = guestPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guestPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The logical name of the guest policy in the project
+       * with the following restrictions:
+       * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for guestPolicyId. + */ + public com.google.protobuf.ByteString getGuestPolicyIdBytes() { + java.lang.Object ref = guestPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + guestPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The logical name of the guest policy in the project
+       * with the following restrictions:
+       * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The guestPolicyId to set. + * @return This builder for chaining. + */ + public Builder setGuestPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + guestPolicyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The logical name of the guest policy in the project
+       * with the following restrictions:
+       * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGuestPolicyId() { + + guestPolicyId_ = getDefaultInstance().getGuestPolicyId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The logical name of the guest policy in the project
+       * with the following restrictions:
+       * * 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 guest_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for guestPolicyId to set. + * @return This builder for chaining. + */ + public Builder setGuestPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + guestPolicyId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy guestPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + guestPolicyBuilder_; + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the guestPolicy field is set. + */ + public boolean hasGuestPolicy() { + return guestPolicyBuilder_ != null || guestPolicy_ != null; + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The guestPolicy. + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy() { + if (guestPolicyBuilder_ == null) { + return guestPolicy_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance() + : guestPolicy_; + } else { + return guestPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + guestPolicy_ = value; + onChanged(); + } else { + guestPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder builderForValue) { + if (guestPolicyBuilder_ == null) { + guestPolicy_ = builderForValue.build(); + onChanged(); + } else { + guestPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPolicyBuilder_ == null) { + if (guestPolicy_ != null) { + guestPolicy_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.newBuilder(guestPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + guestPolicy_ = value; + } + onChanged(); + } else { + guestPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGuestPolicy() { + if (guestPolicyBuilder_ == null) { + guestPolicy_ = null; + onChanged(); + } else { + guestPolicy_ = null; + guestPolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder + getGuestPolicyBuilder() { + + onChanged(); + return getGuestPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder + getGuestPolicyOrBuilder() { + if (guestPolicyBuilder_ != null) { + return guestPolicyBuilder_.getMessageOrBuilder(); + } else { + return guestPolicy_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance() + : guestPolicy_; + } + } + /** + * + * + *
+       * Required. The GuestPolicy to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + getGuestPolicyFieldBuilder() { + if (guestPolicyBuilder_ == null) { + guestPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder>( + getGuestPolicy(), getParentForChildren(), isClean()); + guestPolicy_ = null; + } + return guestPolicyBuilder_; + } + + @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.v1beta.CreateGuestPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.CreateGuestPolicyRequest) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.CreateGuestPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateGuestPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateGuestPolicyRequest(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.v1beta.GuestPolicies.CreateGuestPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetGuestPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.GetGuestPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the guest policy using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name of the guest policy using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * 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 guest policy.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GetGuestPolicyRequest} + */ + public static final class GetGuestPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.GetGuestPolicyRequest) + GetGuestPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGuestPolicyRequest.newBuilder() to construct. + private GetGuestPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetGuestPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetGuestPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetGuestPolicyRequest( + 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the guest policy using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the guest policy using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest) 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.v1beta.GuestPolicies.GetGuestPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest 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.v1beta.GuestPolicies.GetGuestPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest 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.v1beta.GuestPolicies.GetGuestPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest 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.v1beta.GuestPolicies.GetGuestPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + 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.v1beta.GuestPolicies.GetGuestPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest 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.v1beta.GuestPolicies.GetGuestPolicyRequest 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 guest policy.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GetGuestPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GetGuestPolicyRequest) + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest.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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest(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.v1beta.GuestPolicies.GetGuestPolicyRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + .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.v1beta.GuestPolicies.GetGuestPolicyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the guest policy using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the guest policy using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the guest policy using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the guest policy using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the guest policy using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.GetGuestPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GetGuestPolicyRequest) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.GetGuestPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGuestPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetGuestPolicyRequest(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.v1beta.GuestPolicies.GetGuestPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListGuestPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListGuestPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the parent using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * 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 using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * 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 guest policies to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+     * A pagination token returned from a previous call to `ListGuestPolicies`
+     * 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 to `ListGuestPolicies`
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + } + /** + * + * + *
+   * A request message for listing guest policies.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ListGuestPoliciesRequest} + */ + public static final class ListGuestPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.ListGuestPoliciesRequest) + ListGuestPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGuestPoliciesRequest.newBuilder() to construct. + private ListGuestPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGuestPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGuestPoliciesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListGuestPoliciesRequest( + 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The resource name of the parent using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the parent using one of the following forms:
+     * `projects/{project_number}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * The maximum number of guest policies to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * A pagination token returned from a previous call to `ListGuestPolicies`
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call to `ListGuestPolicies`
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1beta.GuestPolicies.ListGuestPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest) 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.v1beta.GuestPolicies.ListGuestPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest 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.v1beta.GuestPolicies.ListGuestPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest 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.v1beta.GuestPolicies.ListGuestPoliciesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest 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.v1beta.GuestPolicies.ListGuestPoliciesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + 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.v1beta.GuestPolicies.ListGuestPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest 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.v1beta.GuestPolicies.ListGuestPoliciesRequest 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 guest policies.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ListGuestPoliciesRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListGuestPoliciesRequest) + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest.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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest(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.v1beta.GuestPolicies.ListGuestPoliciesRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + .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.v1beta.GuestPolicies.ListGuestPoliciesRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest) + 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 using one of the following forms:
+       * `projects/{project_number}`.
+       * 
+ * + * + * 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 guest policies to return.
+       * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+       * The maximum number of guest policies 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 guest policies 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 to `ListGuestPolicies`
+       * 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 to `ListGuestPolicies`
+       * 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 to `ListGuestPolicies`
+       * 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 to `ListGuestPolicies`
+       * 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 to `ListGuestPolicies`
+       * 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; + } + + @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.v1beta.ListGuestPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListGuestPoliciesRequest) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGuestPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListGuestPoliciesRequest(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.v1beta.GuestPolicies.ListGuestPoliciesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListGuestPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListGuestPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + java.util.List + getGuestPoliciesList(); + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicies(int index); + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + int getGuestPoliciesCount(); + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + java.util.List + getGuestPoliciesOrBuilderList(); + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder getGuestPoliciesOrBuilder( + int index); + + /** + * + * + *
+     * A pagination token that can be used to get the next page
+     * of guest policies.
+     * 
+ * + * 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 guest policies.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + } + /** + * + * + *
+   * A response message for listing guest policies.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ListGuestPoliciesResponse} + */ + public static final class ListGuestPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.ListGuestPoliciesResponse) + ListGuestPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListGuestPoliciesResponse.newBuilder() to construct. + private ListGuestPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListGuestPoliciesResponse() { + guestPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListGuestPoliciesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListGuestPoliciesResponse( + 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)) { + guestPolicies_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy>(); + mutable_bitField0_ |= 0x00000001; + } + guestPolicies_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.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)) { + guestPolicies_ = java.util.Collections.unmodifiableList(guestPolicies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse.Builder + .class); + } + + public static final int GUEST_POLICIES_FIELD_NUMBER = 1; + private java.util.List + guestPolicies_; + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + @java.lang.Override + public java.util.List + getGuestPoliciesList() { + return guestPolicies_; + } + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + getGuestPoliciesOrBuilderList() { + return guestPolicies_; + } + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + @java.lang.Override + public int getGuestPoliciesCount() { + return guestPolicies_.size(); + } + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicies(int index) { + return guestPolicies_.get(index); + } + /** + * + * + *
+     * The list of GuestPolicies.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder + getGuestPoliciesOrBuilder(int index) { + return guestPolicies_.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 guest policies.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token that can be used to get the next page
+     * of guest policies.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < guestPolicies_.size(); i++) { + output.writeMessage(1, guestPolicies_.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 < guestPolicies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, guestPolicies_.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.v1beta.GuestPolicies.ListGuestPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse) obj; + + if (!getGuestPoliciesList().equals(other.getGuestPoliciesList())) 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 (getGuestPoliciesCount() > 0) { + hash = (37 * hash) + GUEST_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getGuestPoliciesList().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.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + 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.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + 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.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + 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.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + 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.v1beta.GuestPolicies.ListGuestPoliciesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + 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.v1beta.GuestPolicies.ListGuestPoliciesResponse 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 guest policies.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ListGuestPoliciesResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListGuestPoliciesResponse) + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGuestPoliciesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (guestPoliciesBuilder_ == null) { + guestPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + guestPoliciesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse(this); + int from_bitField0_ = bitField0_; + if (guestPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + guestPolicies_ = java.util.Collections.unmodifiableList(guestPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.guestPolicies_ = guestPolicies_; + } else { + result.guestPolicies_ = guestPoliciesBuilder_.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.v1beta.GuestPolicies.ListGuestPoliciesResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + .getDefaultInstance()) return this; + if (guestPoliciesBuilder_ == null) { + if (!other.guestPolicies_.isEmpty()) { + if (guestPolicies_.isEmpty()) { + guestPolicies_ = other.guestPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGuestPoliciesIsMutable(); + guestPolicies_.addAll(other.guestPolicies_); + } + onChanged(); + } + } else { + if (!other.guestPolicies_.isEmpty()) { + if (guestPoliciesBuilder_.isEmpty()) { + guestPoliciesBuilder_.dispose(); + guestPoliciesBuilder_ = null; + guestPolicies_ = other.guestPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + guestPoliciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGuestPoliciesFieldBuilder() + : null; + } else { + guestPoliciesBuilder_.addAllMessages(other.guestPolicies_); + } + } + } + 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.v1beta.GuestPolicies.ListGuestPoliciesResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + guestPolicies_ = java.util.Collections.emptyList(); + + private void ensureGuestPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + guestPolicies_ = + new java.util.ArrayList( + guestPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + guestPoliciesBuilder_; + + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public java.util.List + getGuestPoliciesList() { + if (guestPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestPolicies_); + } else { + return guestPoliciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public int getGuestPoliciesCount() { + if (guestPoliciesBuilder_ == null) { + return guestPolicies_.size(); + } else { + return guestPoliciesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicies( + int index) { + if (guestPoliciesBuilder_ == null) { + return guestPolicies_.get(index); + } else { + return guestPoliciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder setGuestPolicies( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestPoliciesIsMutable(); + guestPolicies_.set(index, value); + onChanged(); + } else { + guestPoliciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder setGuestPolicies( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder builderForValue) { + if (guestPoliciesBuilder_ == null) { + ensureGuestPoliciesIsMutable(); + guestPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + guestPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder addGuestPolicies( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestPoliciesIsMutable(); + guestPolicies_.add(value); + onChanged(); + } else { + guestPoliciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder addGuestPolicies( + int index, com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestPoliciesIsMutable(); + guestPolicies_.add(index, value); + onChanged(); + } else { + guestPoliciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder addGuestPolicies( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder builderForValue) { + if (guestPoliciesBuilder_ == null) { + ensureGuestPoliciesIsMutable(); + guestPolicies_.add(builderForValue.build()); + onChanged(); + } else { + guestPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder addGuestPolicies( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder builderForValue) { + if (guestPoliciesBuilder_ == null) { + ensureGuestPoliciesIsMutable(); + guestPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + guestPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder addAllGuestPolicies( + java.lang.Iterable + values) { + if (guestPoliciesBuilder_ == null) { + ensureGuestPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestPolicies_); + onChanged(); + } else { + guestPoliciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder clearGuestPolicies() { + if (guestPoliciesBuilder_ == null) { + guestPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + guestPoliciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public Builder removeGuestPolicies(int index) { + if (guestPoliciesBuilder_ == null) { + ensureGuestPoliciesIsMutable(); + guestPolicies_.remove(index); + onChanged(); + } else { + guestPoliciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder + getGuestPoliciesBuilder(int index) { + return getGuestPoliciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder + getGuestPoliciesOrBuilder(int index) { + if (guestPoliciesBuilder_ == null) { + return guestPolicies_.get(index); + } else { + return guestPoliciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + getGuestPoliciesOrBuilderList() { + if (guestPoliciesBuilder_ != null) { + return guestPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestPolicies_); + } + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder + addGuestPoliciesBuilder() { + return getGuestPoliciesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance()); + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder + addGuestPoliciesBuilder(int index) { + return getGuestPoliciesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance()); + } + /** + * + * + *
+       * The list of GuestPolicies.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.GuestPolicy guest_policies = 1; + */ + public java.util.List + getGuestPoliciesBuilderList() { + return getGuestPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + getGuestPoliciesFieldBuilder() { + if (guestPoliciesBuilder_ == null) { + guestPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder>( + guestPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + guestPolicies_ = null; + } + return guestPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+       * A pagination token that can be used to get the next page
+       * of guest policies.
+       * 
+ * + * 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 guest policies.
+       * 
+ * + * 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 guest policies.
+       * 
+ * + * 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 guest policies.
+       * 
+ * + * 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 guest policies.
+       * 
+ * + * 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.v1beta.ListGuestPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListGuestPoliciesResponse) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.ListGuestPoliciesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGuestPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListGuestPoliciesResponse(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.v1beta.GuestPolicies.ListGuestPoliciesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdateGuestPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The updated GuestPolicy.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the guestPolicy field is set. + */ + boolean hasGuestPolicy(); + /** + * + * + *
+     * Required. The updated GuestPolicy.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The guestPolicy. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy(); + /** + * + * + *
+     * Required. The updated GuestPolicy.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder getGuestPolicyOrBuilder(); + + /** + * + * + *
+     * Field mask that controls which fields of the guest policy should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+     * Field mask that controls which fields of the guest policy should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+     * Field mask that controls which fields of the guest policy should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + } + /** + * + * + *
+   * A request message for updating a guest policy.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest} + */ + public static final class UpdateGuestPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest) + UpdateGuestPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateGuestPolicyRequest.newBuilder() to construct. + private UpdateGuestPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateGuestPolicyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateGuestPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateGuestPolicyRequest( + 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.v1beta.GuestPolicies.GuestPolicy.Builder subBuilder = + null; + if (guestPolicy_ != null) { + subBuilder = guestPolicy_.toBuilder(); + } + guestPolicy_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(guestPolicy_); + guestPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest.Builder + .class); + } + + public static final int GUEST_POLICY_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy guestPolicy_; + /** + * + * + *
+     * Required. The updated GuestPolicy.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the guestPolicy field is set. + */ + @java.lang.Override + public boolean hasGuestPolicy() { + return guestPolicy_ != null; + } + /** + * + * + *
+     * Required. The updated GuestPolicy.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The guestPolicy. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy() { + return guestPolicy_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance() + : guestPolicy_; + } + /** + * + * + *
+     * Required. The updated GuestPolicy.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder + getGuestPolicyOrBuilder() { + return getGuestPolicy(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+     * Field mask that controls which fields of the guest policy should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+     * Field mask that controls which fields of the guest policy should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+     * Field mask that controls which fields of the guest policy should be
+     * updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (guestPolicy_ != null) { + output.writeMessage(1, getGuestPolicy()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (guestPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGuestPolicy()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest) obj; + + if (hasGuestPolicy() != other.hasGuestPolicy()) return false; + if (hasGuestPolicy()) { + if (!getGuestPolicy().equals(other.getGuestPolicy())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGuestPolicy()) { + hash = (37 * hash) + GUEST_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getGuestPolicy().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest 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.v1beta.GuestPolicies.UpdateGuestPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest 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.v1beta.GuestPolicies.UpdateGuestPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest 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.v1beta.GuestPolicies.UpdateGuestPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + 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.v1beta.GuestPolicies.UpdateGuestPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest 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.v1beta.GuestPolicies.UpdateGuestPolicyRequest 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 updating a guest policy.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest) + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest.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 (guestPolicyBuilder_ == null) { + guestPolicy_ = null; + } else { + guestPolicy_ = null; + guestPolicyBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest(this); + if (guestPolicyBuilder_ == null) { + result.guestPolicy_ = guestPolicy_; + } else { + result.guestPolicy_ = guestPolicyBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + .getDefaultInstance()) return this; + if (other.hasGuestPolicy()) { + mergeGuestPolicy(other.getGuestPolicy()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy guestPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + guestPolicyBuilder_; + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the guestPolicy field is set. + */ + public boolean hasGuestPolicy() { + return guestPolicyBuilder_ != null || guestPolicy_ != null; + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The guestPolicy. + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy getGuestPolicy() { + if (guestPolicyBuilder_ == null) { + return guestPolicy_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance() + : guestPolicy_; + } else { + return guestPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + guestPolicy_ = value; + onChanged(); + } else { + guestPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder builderForValue) { + if (guestPolicyBuilder_ == null) { + guestPolicy_ = builderForValue.build(); + onChanged(); + } else { + guestPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGuestPolicy( + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy value) { + if (guestPolicyBuilder_ == null) { + if (guestPolicy_ != null) { + guestPolicy_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.newBuilder(guestPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + guestPolicy_ = value; + } + onChanged(); + } else { + guestPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGuestPolicy() { + if (guestPolicyBuilder_ == null) { + guestPolicy_ = null; + onChanged(); + } else { + guestPolicy_ = null; + guestPolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder + getGuestPolicyBuilder() { + + onChanged(); + return getGuestPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder + getGuestPolicyOrBuilder() { + if (guestPolicyBuilder_ != null) { + return guestPolicyBuilder_.getMessageOrBuilder(); + } else { + return guestPolicy_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.getDefaultInstance() + : guestPolicy_; + } + } + /** + * + * + *
+       * Required. The updated GuestPolicy.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.GuestPolicy guest_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder> + getGuestPolicyFieldBuilder() { + if (guestPolicyBuilder_ == null) { + guestPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicy.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.GuestPolicyOrBuilder>( + getGuestPolicy(), getParentForChildren(), isClean()); + guestPolicy_ = null; + } + return guestPolicyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_) + .mergeFrom(value) + .buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+       * Field mask that controls which fields of the guest policy should be
+       * updated.
+       * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.UpdateGuestPolicyRequest) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.UpdateGuestPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGuestPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateGuestPolicyRequest(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.v1beta.GuestPolicies.UpdateGuestPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeleteGuestPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the guest policy  using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name of the guest policy  using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * 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 guest policy.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest} + */ + public static final class DeleteGuestPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest) + DeleteGuestPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteGuestPolicyRequest.newBuilder() to construct. + private DeleteGuestPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteGuestPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteGuestPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteGuestPolicyRequest( + 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the guest policy  using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the guest policy  using one of the following forms:
+     * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest) 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.v1beta.GuestPolicies.DeleteGuestPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest 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.v1beta.GuestPolicies.DeleteGuestPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest 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.v1beta.GuestPolicies.DeleteGuestPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest 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.v1beta.GuestPolicies.DeleteGuestPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + 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.v1beta.GuestPolicies.DeleteGuestPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest 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.v1beta.GuestPolicies.DeleteGuestPolicyRequest 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 guest policy.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest) + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest.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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest(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.v1beta.GuestPolicies.DeleteGuestPolicyRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + .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.v1beta.GuestPolicies.DeleteGuestPolicyRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the guest policy  using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the guest policy  using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the guest policy  using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the guest policy  using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the guest policy  using one of the following forms:
+       * `projects/{project_number}/guestPolicies/{guest_policy_id}`.
+       * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.DeleteGuestPolicyRequest) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.DeleteGuestPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteGuestPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteGuestPolicyRequest(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.v1beta.GuestPolicies.DeleteGuestPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LookupEffectiveGuestPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The VM instance whose policies are being looked up.
+     * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instance. + */ + java.lang.String getInstance(); + /** + * + * + *
+     * Required. The VM instance whose policies are being looked up.
+     * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+     * Short name of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_short_name = 2; + * + * @return The osShortName. + */ + java.lang.String getOsShortName(); + /** + * + * + *
+     * Short name of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_short_name = 2; + * + * @return The bytes for osShortName. + */ + com.google.protobuf.ByteString getOsShortNameBytes(); + + /** + * + * + *
+     * Version of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * VM instance.
+     * 
+ * + * string os_version = 3; + * + * @return The osVersion. + */ + java.lang.String getOsVersion(); + /** + * + * + *
+     * Version of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * VM instance.
+     * 
+ * + * string os_version = 3; + * + * @return The bytes for osVersion. + */ + com.google.protobuf.ByteString getOsVersionBytes(); + + /** + * + * + *
+     * Architecture of OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_architecture = 4; + * + * @return The osArchitecture. + */ + java.lang.String getOsArchitecture(); + /** + * + * + *
+     * Architecture of OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_architecture = 4; + * + * @return The bytes for osArchitecture. + */ + com.google.protobuf.ByteString getOsArchitectureBytes(); + } + /** + * + * + *
+   * A request message for getting the effective guest policy assigned to the
+   * instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest} + */ + public static final class LookupEffectiveGuestPolicyRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest) + LookupEffectiveGuestPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LookupEffectiveGuestPolicyRequest.newBuilder() to construct. + private LookupEffectiveGuestPolicyRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LookupEffectiveGuestPolicyRequest() { + instance_ = ""; + osShortName_ = ""; + osVersion_ = ""; + osArchitecture_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LookupEffectiveGuestPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LookupEffectiveGuestPolicyRequest( + 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(); + + instance_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + osShortName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + osVersion_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + osArchitecture_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + .Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private volatile java.lang.Object instance_; + /** + * + * + *
+     * Required. The VM instance whose policies are being looked up.
+     * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The VM instance whose policies are being looked up.
+     * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_SHORT_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object osShortName_; + /** + * + * + *
+     * Short name of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_short_name = 2; + * + * @return The osShortName. + */ + @java.lang.Override + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } + } + /** + * + * + *
+     * Short name of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_short_name = 2; + * + * @return The bytes for osShortName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object osVersion_; + /** + * + * + *
+     * Version of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * VM instance.
+     * 
+ * + * string os_version = 3; + * + * @return The osVersion. + */ + @java.lang.Override + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } + } + /** + * + * + *
+     * Version of the OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * VM instance.
+     * 
+ * + * string os_version = 3; + * + * @return The bytes for osVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OS_ARCHITECTURE_FIELD_NUMBER = 4; + private volatile java.lang.Object osArchitecture_; + /** + * + * + *
+     * Architecture of OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_architecture = 4; + * + * @return The osArchitecture. + */ + @java.lang.Override + public java.lang.String getOsArchitecture() { + java.lang.Object ref = osArchitecture_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osArchitecture_ = s; + return s; + } + } + /** + * + * + *
+     * Architecture of OS running on the instance. The OS Config agent only
+     * provides this field for targeting if OS Inventory is enabled for that
+     * instance.
+     * 
+ * + * string os_architecture = 4; + * + * @return The bytes for osArchitecture. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOsArchitectureBytes() { + java.lang.Object ref = osArchitecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osArchitecture_ = 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 (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instance_); + } + if (!getOsShortNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, osShortName_); + } + if (!getOsVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, osVersion_); + } + if (!getOsArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, osArchitecture_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instance_); + } + if (!getOsShortNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, osShortName_); + } + if (!getOsVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, osVersion_); + } + if (!getOsArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, osArchitecture_); + } + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest) obj; + + if (!getInstance().equals(other.getInstance())) return false; + if (!getOsShortName().equals(other.getOsShortName())) return false; + if (!getOsVersion().equals(other.getOsVersion())) return false; + if (!getOsArchitecture().equals(other.getOsArchitecture())) 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) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + OS_SHORT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOsShortName().hashCode(); + hash = (37 * hash) + OS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getOsVersion().hashCode(); + hash = (37 * hash) + OS_ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getOsArchitecture().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + 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 getting the effective guest policy assigned to the
+     * instance.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest) + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest.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(); + instance_ = ""; + + osShortName_ = ""; + + osVersion_ = ""; + + osArchitecture_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest( + this); + result.instance_ = instance_; + result.osShortName_ = osShortName_; + result.osVersion_ = osVersion_; + result.osArchitecture_ = osArchitecture_; + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + .getDefaultInstance()) return this; + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (!other.getOsShortName().isEmpty()) { + osShortName_ = other.osShortName_; + onChanged(); + } + if (!other.getOsVersion().isEmpty()) { + osVersion_ = other.osVersion_; + onChanged(); + } + if (!other.getOsArchitecture().isEmpty()) { + osArchitecture_ = other.osArchitecture_; + 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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object instance_ = ""; + /** + * + * + *
+       * Required. The VM instance whose policies are being looked up.
+       * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The VM instance whose policies are being looked up.
+       * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The VM instance whose policies are being looked up.
+       * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The VM instance whose policies are being looked up.
+       * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The VM instance whose policies are being looked up.
+       * 
+ * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private java.lang.Object osShortName_ = ""; + /** + * + * + *
+       * Short name of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_short_name = 2; + * + * @return The osShortName. + */ + public java.lang.String getOsShortName() { + java.lang.Object ref = osShortName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osShortName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Short name of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_short_name = 2; + * + * @return The bytes for osShortName. + */ + public com.google.protobuf.ByteString getOsShortNameBytes() { + java.lang.Object ref = osShortName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osShortName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Short name of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_short_name = 2; + * + * @param value The osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osShortName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Short name of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_short_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearOsShortName() { + + osShortName_ = getDefaultInstance().getOsShortName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Short name of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_short_name = 2; + * + * @param value The bytes for osShortName to set. + * @return This builder for chaining. + */ + public Builder setOsShortNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osShortName_ = value; + onChanged(); + return this; + } + + private java.lang.Object osVersion_ = ""; + /** + * + * + *
+       * Version of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * VM instance.
+       * 
+ * + * string os_version = 3; + * + * @return The osVersion. + */ + public java.lang.String getOsVersion() { + java.lang.Object ref = osVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Version of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * VM instance.
+       * 
+ * + * string os_version = 3; + * + * @return The bytes for osVersion. + */ + public com.google.protobuf.ByteString getOsVersionBytes() { + java.lang.Object ref = osVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Version of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * VM instance.
+       * 
+ * + * string os_version = 3; + * + * @param value The osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Version of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * VM instance.
+       * 
+ * + * string os_version = 3; + * + * @return This builder for chaining. + */ + public Builder clearOsVersion() { + + osVersion_ = getDefaultInstance().getOsVersion(); + onChanged(); + return this; + } + /** + * + * + *
+       * Version of the OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * VM instance.
+       * 
+ * + * string os_version = 3; + * + * @param value The bytes for osVersion to set. + * @return This builder for chaining. + */ + public Builder setOsVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osVersion_ = value; + onChanged(); + return this; + } + + private java.lang.Object osArchitecture_ = ""; + /** + * + * + *
+       * Architecture of OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_architecture = 4; + * + * @return The osArchitecture. + */ + public java.lang.String getOsArchitecture() { + java.lang.Object ref = osArchitecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + osArchitecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Architecture of OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_architecture = 4; + * + * @return The bytes for osArchitecture. + */ + public com.google.protobuf.ByteString getOsArchitectureBytes() { + java.lang.Object ref = osArchitecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + osArchitecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Architecture of OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_architecture = 4; + * + * @param value The osArchitecture to set. + * @return This builder for chaining. + */ + public Builder setOsArchitecture(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + osArchitecture_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Architecture of OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_architecture = 4; + * + * @return This builder for chaining. + */ + public Builder clearOsArchitecture() { + + osArchitecture_ = getDefaultInstance().getOsArchitecture(); + onChanged(); + return this; + } + /** + * + * + *
+       * Architecture of OS running on the instance. The OS Config agent only
+       * provides this field for targeting if OS Inventory is enabled for that
+       * instance.
+       * 
+ * + * string os_architecture = 4; + * + * @param value The bytes for osArchitecture to set. + * @return This builder for chaining. + */ + public Builder setOsArchitectureBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + osArchitecture_ = 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.v1beta.LookupEffectiveGuestPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.LookupEffectiveGuestPolicyRequest) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies + .LookupEffectiveGuestPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupEffectiveGuestPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LookupEffectiveGuestPolicyRequest(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.v1beta.GuestPolicies.LookupEffectiveGuestPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EffectiveGuestPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.EffectiveGuestPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage> + getPackagesList(); + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage getPackages( + int index); + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + int getPackagesCount(); + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder> + getPackagesOrBuilderList(); + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackageOrBuilder + getPackagesOrBuilder(int index); + + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository> + getPackageRepositoriesList(); + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackageRepository + getPackageRepositories(int index); + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + int getPackageRepositoriesCount(); + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder> + getPackageRepositoriesOrBuilderList(); + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder + getPackageRepositoriesOrBuilder(int index); + + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe> + getSoftwareRecipesList(); + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + getSoftwareRecipes(int index); + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + int getSoftwareRecipesCount(); + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder> + getSoftwareRecipesOrBuilderList(); + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder + getSoftwareRecipesOrBuilder(int index); + } + /** + * + * + *
+   * The effective guest policy that applies to a VM instance.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.EffectiveGuestPolicy} + */ + public static final class EffectiveGuestPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy) + EffectiveGuestPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use EffectiveGuestPolicy.newBuilder() to construct. + private EffectiveGuestPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EffectiveGuestPolicy() { + packages_ = java.util.Collections.emptyList(); + packageRepositories_ = java.util.Collections.emptyList(); + softwareRecipes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EffectiveGuestPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EffectiveGuestPolicy( + 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)) { + packages_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage>(); + mutable_bitField0_ |= 0x00000001; + } + packages_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository>(); + mutable_bitField0_ |= 0x00000002; + } + packageRepositories_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + softwareRecipes_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe>(); + mutable_bitField0_ |= 0x00000004; + } + softwareRecipes_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + packages_ = java.util.Collections.unmodifiableList(packages_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = java.util.Collections.unmodifiableList(packageRepositories_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + softwareRecipes_ = java.util.Collections.unmodifiableList(softwareRecipes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.Builder.class); + } + + public interface SourcedPackageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+       * A software package to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + * + * @return Whether the package field is set. + */ + boolean hasPackage(); + /** + * + * + *
+       * A software package to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + * + * @return The package. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.Package getPackage(); + /** + * + * + *
+       * A software package to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder getPackageOrBuilder(); + } + /** + * + * + *
+     * A guest policy package including its source.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage} + */ + public static final class SourcedPackage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage) + SourcedPackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use SourcedPackage.newBuilder() to construct. + private SourcedPackage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SourcedPackage() { + source_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SourcedPackage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SourcedPackage( + 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(); + + source_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder subBuilder = null; + if (package_ != null) { + subBuilder = package_.toBuilder(); + } + package_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(package_); + package_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder.class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1beta.GuestPolicies.Package package_; + /** + * + * + *
+       * A software package to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + * + * @return Whether the package field is set. + */ + @java.lang.Override + public boolean hasPackage() { + return package_ != null; + } + /** + * + * + *
+       * A software package to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + * + * @return The package. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package getPackage() { + return package_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance() + : package_; + } + /** + * + * + *
+       * A software package to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder getPackageOrBuilder() { + return getPackage(); + } + + 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 (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); + } + if (package_ != null) { + output.writeMessage(2, getPackage()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); + } + if (package_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPackage()); + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage) + obj; + + if (!getSource().equals(other.getSource())) return false; + if (hasPackage() != other.hasPackage()) return false; + if (hasPackage()) { + if (!getPackage().equals(other.getPackage())) 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) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + if (hasPackage()) { + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + 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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + 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 guest policy package including its source.
+       * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage) + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage.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(); + source_ = ""; + + if (packageBuilder_ == null) { + package_ = null; + } else { + package_ = null; + packageBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage(this); + result.source_ = source_; + if (packageBuilder_ == null) { + result.package_ = package_; + } else { + result.package_ = packageBuilder_.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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .getDefaultInstance()) return this; + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (other.hasPackage()) { + mergePackage(other.getPackage()); + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.GuestPolicies.Package package_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder> + packageBuilder_; + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + * + * @return Whether the package field is set. + */ + public boolean hasPackage() { + return packageBuilder_ != null || package_ != null; + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + * + * @return The package. + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package getPackage() { + if (packageBuilder_ == null) { + return package_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance() + : package_; + } else { + return packageBuilder_.getMessage(); + } + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + public Builder setPackage(com.google.cloud.osconfig.v1beta.GuestPolicies.Package value) { + if (packageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + package_ = value; + onChanged(); + } else { + packageBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + public Builder setPackage( + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder builderForValue) { + if (packageBuilder_ == null) { + package_ = builderForValue.build(); + onChanged(); + } else { + packageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + public Builder mergePackage(com.google.cloud.osconfig.v1beta.GuestPolicies.Package value) { + if (packageBuilder_ == null) { + if (package_ != null) { + package_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.newBuilder(package_) + .mergeFrom(value) + .buildPartial(); + } else { + package_ = value; + } + onChanged(); + } else { + packageBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + public Builder clearPackage() { + if (packageBuilder_ == null) { + package_ = null; + onChanged(); + } else { + package_ = null; + packageBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder getPackageBuilder() { + + onChanged(); + return getPackageFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder + getPackageOrBuilder() { + if (packageBuilder_ != null) { + return packageBuilder_.getMessageOrBuilder(); + } else { + return package_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.Package.getDefaultInstance() + : package_; + } + } + /** + * + * + *
+         * A software package to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.Package package = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder> + getPackageFieldBuilder() { + if (packageBuilder_ == null) { + packageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.Package, + com.google.cloud.osconfig.v1beta.GuestPolicies.Package.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageOrBuilder>( + getPackage(), getParentForChildren(), isClean()); + package_ = null; + } + return packageBuilder_; + } + + @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.v1beta.EffectiveGuestPolicy.SourcedPackage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourcedPackage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SourcedPackage(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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SourcedPackageRepositoryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+       * A software package repository to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + * + * @return Whether the packageRepository field is set. + */ + boolean hasPackageRepository(); + /** + * + * + *
+       * A software package repository to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + * + * @return The packageRepository. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository getPackageRepository(); + /** + * + * + *
+       * A software package repository to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder + getPackageRepositoryOrBuilder(); + } + /** + * + * + *
+     * A guest policy package repository including its source.
+     * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository} + */ + public static final class SourcedPackageRepository + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository) + SourcedPackageRepositoryOrBuilder { + private static final long serialVersionUID = 0L; + // Use SourcedPackageRepository.newBuilder() to construct. + private SourcedPackageRepository(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SourcedPackageRepository() { + source_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SourcedPackageRepository(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SourcedPackageRepository( + 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(); + + source_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + subBuilder = null; + if (packageRepository_ != null) { + subBuilder = packageRepository_.toBuilder(); + } + packageRepository_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(packageRepository_); + packageRepository_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder.class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_REPOSITORY_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository packageRepository_; + /** + * + * + *
+       * A software package repository to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + * + * @return Whether the packageRepository field is set. + */ + @java.lang.Override + public boolean hasPackageRepository() { + return packageRepository_ != null; + } + /** + * + * + *
+       * A software package repository to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + * + * @return The packageRepository. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + getPackageRepository() { + return packageRepository_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.getDefaultInstance() + : packageRepository_; + } + /** + * + * + *
+       * A software package repository to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder + getPackageRepositoryOrBuilder() { + return getPackageRepository(); + } + + 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 (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); + } + if (packageRepository_ != null) { + output.writeMessage(2, getPackageRepository()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); + } + if (packageRepository_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPackageRepository()); + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackageRepository + other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository) + obj; + + if (!getSource().equals(other.getSource())) return false; + if (hasPackageRepository() != other.hasPackageRepository()) return false; + if (hasPackageRepository()) { + if (!getPackageRepository().equals(other.getPackageRepository())) 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) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + if (hasPackageRepository()) { + hash = (37 * hash) + PACKAGE_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getPackageRepository().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + 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 guest policy package repository including its source.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository) + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackageRepository.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(); + source_ = ""; + + if (packageRepositoryBuilder_ == null) { + packageRepository_ = null; + } else { + packageRepository_ = null; + packageRepositoryBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository(this); + result.source_ = source_; + if (packageRepositoryBuilder_ == null) { + result.packageRepository_ = packageRepository_; + } else { + result.packageRepository_ = packageRepositoryBuilder_.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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.getDefaultInstance()) return this; + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (other.hasPackageRepository()) { + mergePackageRepository(other.getPackageRepository()); + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository packageRepository_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + packageRepositoryBuilder_; + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + * + * @return Whether the packageRepository field is set. + */ + public boolean hasPackageRepository() { + return packageRepositoryBuilder_ != null || packageRepository_ != null; + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + * + * @return The packageRepository. + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + getPackageRepository() { + if (packageRepositoryBuilder_ == null) { + return packageRepository_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + .getDefaultInstance() + : packageRepository_; + } else { + return packageRepositoryBuilder_.getMessage(); + } + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + public Builder setPackageRepository( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository value) { + if (packageRepositoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + packageRepository_ = value; + onChanged(); + } else { + packageRepositoryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + public Builder setPackageRepository( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + builderForValue) { + if (packageRepositoryBuilder_ == null) { + packageRepository_ = builderForValue.build(); + onChanged(); + } else { + packageRepositoryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + public Builder mergePackageRepository( + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository value) { + if (packageRepositoryBuilder_ == null) { + if (packageRepository_ != null) { + packageRepository_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.newBuilder( + packageRepository_) + .mergeFrom(value) + .buildPartial(); + } else { + packageRepository_ = value; + } + onChanged(); + } else { + packageRepositoryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + public Builder clearPackageRepository() { + if (packageRepositoryBuilder_ == null) { + packageRepository_ = null; + onChanged(); + } else { + packageRepository_ = null; + packageRepositoryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder + getPackageRepositoryBuilder() { + + onChanged(); + return getPackageRepositoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder + getPackageRepositoryOrBuilder() { + if (packageRepositoryBuilder_ != null) { + return packageRepositoryBuilder_.getMessageOrBuilder(); + } else { + return packageRepository_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository + .getDefaultInstance() + : packageRepository_; + } + } + /** + * + * + *
+         * A software package repository to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.PackageRepository package_repository = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder> + getPackageRepositoryFieldBuilder() { + if (packageRepositoryBuilder_ == null) { + packageRepositoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.PackageRepositoryOrBuilder>( + getPackageRepository(), getParentForChildren(), isClean()); + packageRepository_ = null; + } + return packageRepositoryBuilder_; + } + + @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.v1beta.EffectiveGuestPolicy.SourcedPackageRepository) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourcedPackageRepository parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SourcedPackageRepository(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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SourcedSoftwareRecipeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + java.lang.String getSource(); + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+       * A software recipe to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + * + * @return Whether the softwareRecipe field is set. + */ + boolean hasSoftwareRecipe(); + /** + * + * + *
+       * A software recipe to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + * + * @return The softwareRecipe. + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe getSoftwareRecipe(); + /** + * + * + *
+       * A software recipe to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder + getSoftwareRecipeOrBuilder(); + } + /** + * + * + *
+     * A guest policy recipe including its source.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe} + */ + public static final class SourcedSoftwareRecipe extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe) + SourcedSoftwareRecipeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SourcedSoftwareRecipe.newBuilder() to construct. + private SourcedSoftwareRecipe(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SourcedSoftwareRecipe() { + source_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SourcedSoftwareRecipe(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SourcedSoftwareRecipe( + 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(); + + source_ = s; + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder subBuilder = + null; + if (softwareRecipe_ != null) { + subBuilder = softwareRecipe_.toBuilder(); + } + softwareRecipe_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(softwareRecipe_); + softwareRecipe_ = 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.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder.class); + } + + public static final int SOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object source_; + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } + } + /** + * + * + *
+       * Name of the guest policy providing this config.
+       * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOFTWARE_RECIPE_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe softwareRecipe_; + /** + * + * + *
+       * A software recipe to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + * + * @return Whether the softwareRecipe field is set. + */ + @java.lang.Override + public boolean hasSoftwareRecipe() { + return softwareRecipe_ != null; + } + /** + * + * + *
+       * A software recipe to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + * + * @return The softwareRecipe. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe getSoftwareRecipe() { + return softwareRecipe_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance() + : softwareRecipe_; + } + /** + * + * + *
+       * A software recipe to configure on the VM instance.
+       * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder + getSoftwareRecipeOrBuilder() { + return getSoftwareRecipe(); + } + + 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 (!getSourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); + } + if (softwareRecipe_ != null) { + output.writeMessage(2, getSoftwareRecipe()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); + } + if (softwareRecipe_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSoftwareRecipe()); + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe) + obj; + + if (!getSource().equals(other.getSource())) return false; + if (hasSoftwareRecipe() != other.hasSoftwareRecipe()) return false; + if (hasSoftwareRecipe()) { + if (!getSoftwareRecipe().equals(other.getSoftwareRecipe())) 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) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + if (hasSoftwareRecipe()) { + hash = (37 * hash) + SOFTWARE_RECIPE_FIELD_NUMBER; + hash = (53 * hash) + getSoftwareRecipe().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + 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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + 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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + 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 guest policy recipe including its source.
+       * 
+ * + * Protobuf type {@code + * google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe) + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe.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(); + source_ = ""; + + if (softwareRecipeBuilder_ == null) { + softwareRecipe_ = null; + } else { + softwareRecipe_ = null; + softwareRecipeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe(this); + result.source_ = source_; + if (softwareRecipeBuilder_ == null) { + result.softwareRecipe_ = softwareRecipe_; + } else { + result.softwareRecipe_ = softwareRecipeBuilder_.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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.getDefaultInstance()) return this; + if (!other.getSource().isEmpty()) { + source_ = other.source_; + onChanged(); + } + if (other.hasSoftwareRecipe()) { + mergeSoftwareRecipe(other.getSoftwareRecipe()); + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object source_ = ""; + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + source_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * + * + *
+         * Name of the guest policy providing this config.
+         * 
+ * + * string source = 1; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + source_ = value; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe softwareRecipe_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder> + softwareRecipeBuilder_; + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + * + * @return Whether the softwareRecipe field is set. + */ + public boolean hasSoftwareRecipe() { + return softwareRecipeBuilder_ != null || softwareRecipe_ != null; + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + * + * @return The softwareRecipe. + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe getSoftwareRecipe() { + if (softwareRecipeBuilder_ == null) { + return softwareRecipe_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance() + : softwareRecipe_; + } else { + return softwareRecipeBuilder_.getMessage(); + } + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + public Builder setSoftwareRecipe( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe value) { + if (softwareRecipeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softwareRecipe_ = value; + onChanged(); + } else { + softwareRecipeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + public Builder setSoftwareRecipe( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder builderForValue) { + if (softwareRecipeBuilder_ == null) { + softwareRecipe_ = builderForValue.build(); + onChanged(); + } else { + softwareRecipeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + public Builder mergeSoftwareRecipe( + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe value) { + if (softwareRecipeBuilder_ == null) { + if (softwareRecipe_ != null) { + softwareRecipe_ = + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.newBuilder( + softwareRecipe_) + .mergeFrom(value) + .buildPartial(); + } else { + softwareRecipe_ = value; + } + onChanged(); + } else { + softwareRecipeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + public Builder clearSoftwareRecipe() { + if (softwareRecipeBuilder_ == null) { + softwareRecipe_ = null; + onChanged(); + } else { + softwareRecipe_ = null; + softwareRecipeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder + getSoftwareRecipeBuilder() { + + onChanged(); + return getSoftwareRecipeFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder + getSoftwareRecipeOrBuilder() { + if (softwareRecipeBuilder_ != null) { + return softwareRecipeBuilder_.getMessageOrBuilder(); + } else { + return softwareRecipe_ == null + ? com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.getDefaultInstance() + : softwareRecipe_; + } + } + /** + * + * + *
+         * A software recipe to configure on the VM instance.
+         * 
+ * + * .google.cloud.osconfig.v1beta.SoftwareRecipe software_recipe = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder> + getSoftwareRecipeFieldBuilder() { + if (softwareRecipeBuilder_ == null) { + softwareRecipeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.SoftwareRecipeOrBuilder>( + getSoftwareRecipe(), getParentForChildren(), isClean()); + softwareRecipe_ = null; + } + return softwareRecipeBuilder_; + } + + @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.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SourcedSoftwareRecipe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SourcedSoftwareRecipe(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.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PACKAGES_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage> + packages_; + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage> + getPackagesList() { + return packages_; + } + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder> + getPackagesOrBuilderList() { + return packages_; + } + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + @java.lang.Override + public int getPackagesCount() { + return packages_.size(); + } + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + getPackages(int index) { + return packages_.get(index); + } + /** + * + * + *
+     * List of package configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder + getPackagesOrBuilder(int index) { + return packages_.get(index); + } + + public static final int PACKAGE_REPOSITORIES_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository> + packageRepositories_; + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository> + getPackageRepositoriesList() { + return packageRepositories_; + } + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder> + getPackageRepositoriesOrBuilderList() { + return packageRepositories_; + } + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + @java.lang.Override + public int getPackageRepositoriesCount() { + return packageRepositories_.size(); + } + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + getPackageRepositories(int index) { + return packageRepositories_.get(index); + } + /** + * + * + *
+     * List of package repository configurations assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder + getPackageRepositoriesOrBuilder(int index) { + return packageRepositories_.get(index); + } + + public static final int SOFTWARE_RECIPES_FIELD_NUMBER = 3; + private java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe> + softwareRecipes_; + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe> + getSoftwareRecipesList() { + return softwareRecipes_; + } + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder> + getSoftwareRecipesOrBuilderList() { + return softwareRecipes_; + } + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + @java.lang.Override + public int getSoftwareRecipesCount() { + return softwareRecipes_.size(); + } + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + getSoftwareRecipes(int index) { + return softwareRecipes_.get(index); + } + /** + * + * + *
+     * List of recipes assigned to the VM instance.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder + getSoftwareRecipesOrBuilder(int index) { + return softwareRecipes_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < packages_.size(); i++) { + output.writeMessage(1, packages_.get(i)); + } + for (int i = 0; i < packageRepositories_.size(); i++) { + output.writeMessage(2, packageRepositories_.get(i)); + } + for (int i = 0; i < softwareRecipes_.size(); i++) { + output.writeMessage(3, softwareRecipes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < packages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, packages_.get(i)); + } + for (int i = 0; i < packageRepositories_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, packageRepositories_.get(i)); + } + for (int i = 0; i < softwareRecipes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, softwareRecipes_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy other = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy) obj; + + if (!getPackagesList().equals(other.getPackagesList())) return false; + if (!getPackageRepositoriesList().equals(other.getPackageRepositoriesList())) return false; + if (!getSoftwareRecipesList().equals(other.getSoftwareRecipesList())) 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 (getPackagesCount() > 0) { + hash = (37 * hash) + PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + getPackagesList().hashCode(); + } + if (getPackageRepositoriesCount() > 0) { + hash = (37 * hash) + PACKAGE_REPOSITORIES_FIELD_NUMBER; + hash = (53 * hash) + getPackageRepositoriesList().hashCode(); + } + if (getSoftwareRecipesCount() > 0) { + hash = (37 * hash) + SOFTWARE_RECIPES_FIELD_NUMBER; + hash = (53 * hash) + getSoftwareRecipesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy 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.v1beta.GuestPolicies.EffectiveGuestPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy 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.v1beta.GuestPolicies.EffectiveGuestPolicy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy 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.v1beta.GuestPolicies.EffectiveGuestPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + 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.v1beta.GuestPolicies.EffectiveGuestPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy 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.v1beta.GuestPolicies.EffectiveGuestPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The effective guest policy that applies to a VM instance.
+     * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.EffectiveGuestPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.EffectiveGuestPolicy) + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.class, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPackagesFieldBuilder(); + getPackageRepositoriesFieldBuilder(); + getSoftwareRecipesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (packagesBuilder_ == null) { + packages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + packagesBuilder_.clear(); + } + if (packageRepositoriesBuilder_ == null) { + packageRepositories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + packageRepositoriesBuilder_.clear(); + } + if (softwareRecipesBuilder_ == null) { + softwareRecipes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + softwareRecipesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies + .internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy build() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy buildPartial() { + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy result = + new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy(this); + int from_bitField0_ = bitField0_; + if (packagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + packages_ = java.util.Collections.unmodifiableList(packages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.packages_ = packages_; + } else { + result.packages_ = packagesBuilder_.build(); + } + if (packageRepositoriesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = java.util.Collections.unmodifiableList(packageRepositories_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.packageRepositories_ = packageRepositories_; + } else { + result.packageRepositories_ = packageRepositoriesBuilder_.build(); + } + if (softwareRecipesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + softwareRecipes_ = java.util.Collections.unmodifiableList(softwareRecipes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.softwareRecipes_ = softwareRecipes_; + } else { + result.softwareRecipes_ = softwareRecipesBuilder_.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.v1beta.GuestPolicies.EffectiveGuestPolicy) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy other) { + if (other + == com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .getDefaultInstance()) return this; + if (packagesBuilder_ == null) { + if (!other.packages_.isEmpty()) { + if (packages_.isEmpty()) { + packages_ = other.packages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePackagesIsMutable(); + packages_.addAll(other.packages_); + } + onChanged(); + } + } else { + if (!other.packages_.isEmpty()) { + if (packagesBuilder_.isEmpty()) { + packagesBuilder_.dispose(); + packagesBuilder_ = null; + packages_ = other.packages_; + bitField0_ = (bitField0_ & ~0x00000001); + packagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPackagesFieldBuilder() + : null; + } else { + packagesBuilder_.addAllMessages(other.packages_); + } + } + } + if (packageRepositoriesBuilder_ == null) { + if (!other.packageRepositories_.isEmpty()) { + if (packageRepositories_.isEmpty()) { + packageRepositories_ = other.packageRepositories_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.addAll(other.packageRepositories_); + } + onChanged(); + } + } else { + if (!other.packageRepositories_.isEmpty()) { + if (packageRepositoriesBuilder_.isEmpty()) { + packageRepositoriesBuilder_.dispose(); + packageRepositoriesBuilder_ = null; + packageRepositories_ = other.packageRepositories_; + bitField0_ = (bitField0_ & ~0x00000002); + packageRepositoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPackageRepositoriesFieldBuilder() + : null; + } else { + packageRepositoriesBuilder_.addAllMessages(other.packageRepositories_); + } + } + } + if (softwareRecipesBuilder_ == null) { + if (!other.softwareRecipes_.isEmpty()) { + if (softwareRecipes_.isEmpty()) { + softwareRecipes_ = other.softwareRecipes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.addAll(other.softwareRecipes_); + } + onChanged(); + } + } else { + if (!other.softwareRecipes_.isEmpty()) { + if (softwareRecipesBuilder_.isEmpty()) { + softwareRecipesBuilder_.dispose(); + softwareRecipesBuilder_ = null; + softwareRecipes_ = other.softwareRecipes_; + bitField0_ = (bitField0_ & ~0x00000004); + softwareRecipesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSoftwareRecipesFieldBuilder() + : null; + } else { + softwareRecipesBuilder_.addAllMessages(other.softwareRecipes_); + } + } + } + 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.v1beta.GuestPolicies.EffectiveGuestPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage> + packages_ = java.util.Collections.emptyList(); + + private void ensurePackagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + packages_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage>(packages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder> + packagesBuilder_; + + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage> + getPackagesList() { + if (packagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(packages_); + } else { + return packagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public int getPackagesCount() { + if (packagesBuilder_ == null) { + return packages_.size(); + } else { + return packagesBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + getPackages(int index) { + if (packagesBuilder_ == null) { + return packages_.get(index); + } else { + return packagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder setPackages( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + value) { + if (packagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackagesIsMutable(); + packages_.set(index, value); + onChanged(); + } else { + packagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder setPackages( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage.Builder + builderForValue) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.set(index, builderForValue.build()); + onChanged(); + } else { + packagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder addPackages( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + value) { + if (packagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackagesIsMutable(); + packages_.add(value); + onChanged(); + } else { + packagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder addPackages( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + value) { + if (packagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackagesIsMutable(); + packages_.add(index, value); + onChanged(); + } else { + packagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder addPackages( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage.Builder + builderForValue) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.add(builderForValue.build()); + onChanged(); + } else { + packagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder addPackages( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage.Builder + builderForValue) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.add(index, builderForValue.build()); + onChanged(); + } else { + packagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder addAllPackages( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage> + values) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packages_); + onChanged(); + } else { + packagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder clearPackages() { + if (packagesBuilder_ == null) { + packages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + packagesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public Builder removePackages(int index) { + if (packagesBuilder_ == null) { + ensurePackagesIsMutable(); + packages_.remove(index); + onChanged(); + } else { + packagesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder + getPackagesBuilder(int index) { + return getPackagesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder + getPackagesOrBuilder(int index) { + if (packagesBuilder_ == null) { + return packages_.get(index); + } else { + return packagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder> + getPackagesOrBuilderList() { + if (packagesBuilder_ != null) { + return packagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(packages_); + } + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder + addPackagesBuilder() { + return getPackagesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .getDefaultInstance()); + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder + addPackagesBuilder(int index) { + return getPackagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .getDefaultInstance()); + } + /** + * + * + *
+       * List of package configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackage packages = 1; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder> + getPackagesBuilderList() { + return getPackagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder> + getPackagesFieldBuilder() { + if (packagesBuilder_ == null) { + packagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackage, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedPackage + .Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageOrBuilder>( + packages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + packages_ = null; + } + return packagesBuilder_; + } + + private java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository> + packageRepositories_ = java.util.Collections.emptyList(); + + private void ensurePackageRepositoriesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + packageRepositories_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository>(packageRepositories_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder> + packageRepositoriesBuilder_; + + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository> + getPackageRepositoriesList() { + if (packageRepositoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(packageRepositories_); + } else { + return packageRepositoriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public int getPackageRepositoriesCount() { + if (packageRepositoriesBuilder_ == null) { + return packageRepositories_.size(); + } else { + return packageRepositoriesBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + getPackageRepositories(int index) { + if (packageRepositoriesBuilder_ == null) { + return packageRepositories_.get(index); + } else { + return packageRepositoriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder setPackageRepositories( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + value) { + if (packageRepositoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageRepositoriesIsMutable(); + packageRepositories_.set(index, value); + onChanged(); + } else { + packageRepositoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder setPackageRepositories( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder + builderForValue) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.set(index, builderForValue.build()); + onChanged(); + } else { + packageRepositoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder addPackageRepositories( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + value) { + if (packageRepositoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(value); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder addPackageRepositories( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository + value) { + if (packageRepositoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(index, value); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder addPackageRepositories( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder + builderForValue) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(builderForValue.build()); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder addPackageRepositories( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder + builderForValue) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.add(index, builderForValue.build()); + onChanged(); + } else { + packageRepositoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder addAllPackageRepositories( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository> + values) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packageRepositories_); + onChanged(); + } else { + packageRepositoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder clearPackageRepositories() { + if (packageRepositoriesBuilder_ == null) { + packageRepositories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + packageRepositoriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public Builder removePackageRepositories(int index) { + if (packageRepositoriesBuilder_ == null) { + ensurePackageRepositoriesIsMutable(); + packageRepositories_.remove(index); + onChanged(); + } else { + packageRepositoriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder + getPackageRepositoriesBuilder(int index) { + return getPackageRepositoriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder + getPackageRepositoriesOrBuilder(int index) { + if (packageRepositoriesBuilder_ == null) { + return packageRepositories_.get(index); + } else { + return packageRepositoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder> + getPackageRepositoriesOrBuilderList() { + if (packageRepositoriesBuilder_ != null) { + return packageRepositoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(packageRepositories_); + } + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder + addPackageRepositoriesBuilder() { + return getPackageRepositoriesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.getDefaultInstance()); + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder + addPackageRepositoriesBuilder(int index) { + return getPackageRepositoriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.getDefaultInstance()); + } + /** + * + * + *
+       * List of package repository configurations assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedPackageRepository package_repositories = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder> + getPackageRepositoriesBuilderList() { + return getPackageRepositoriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder> + getPackageRepositoriesFieldBuilder() { + if (packageRepositoriesBuilder_ == null) { + packageRepositoriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepository.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedPackageRepositoryOrBuilder>( + packageRepositories_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + packageRepositories_ = null; + } + return packageRepositoriesBuilder_; + } + + private java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe> + softwareRecipes_ = java.util.Collections.emptyList(); + + private void ensureSoftwareRecipesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + softwareRecipes_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe>(softwareRecipes_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder> + softwareRecipesBuilder_; + + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe> + getSoftwareRecipesList() { + if (softwareRecipesBuilder_ == null) { + return java.util.Collections.unmodifiableList(softwareRecipes_); + } else { + return softwareRecipesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public int getSoftwareRecipesCount() { + if (softwareRecipesBuilder_ == null) { + return softwareRecipes_.size(); + } else { + return softwareRecipesBuilder_.getCount(); + } + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe + getSoftwareRecipes(int index) { + if (softwareRecipesBuilder_ == null) { + return softwareRecipes_.get(index); + } else { + return softwareRecipesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder setSoftwareRecipes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + value) { + if (softwareRecipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.set(index, value); + onChanged(); + } else { + softwareRecipesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder setSoftwareRecipes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + .Builder + builderForValue) { + if (softwareRecipesBuilder_ == null) { + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.set(index, builderForValue.build()); + onChanged(); + } else { + softwareRecipesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder addSoftwareRecipes( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + value) { + if (softwareRecipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.add(value); + onChanged(); + } else { + softwareRecipesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder addSoftwareRecipes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + value) { + if (softwareRecipesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.add(index, value); + onChanged(); + } else { + softwareRecipesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder addSoftwareRecipes( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + .Builder + builderForValue) { + if (softwareRecipesBuilder_ == null) { + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.add(builderForValue.build()); + onChanged(); + } else { + softwareRecipesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder addSoftwareRecipes( + int index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy.SourcedSoftwareRecipe + .Builder + builderForValue) { + if (softwareRecipesBuilder_ == null) { + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.add(index, builderForValue.build()); + onChanged(); + } else { + softwareRecipesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder addAllSoftwareRecipes( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe> + values) { + if (softwareRecipesBuilder_ == null) { + ensureSoftwareRecipesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, softwareRecipes_); + onChanged(); + } else { + softwareRecipesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder clearSoftwareRecipes() { + if (softwareRecipesBuilder_ == null) { + softwareRecipes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + softwareRecipesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public Builder removeSoftwareRecipes(int index) { + if (softwareRecipesBuilder_ == null) { + ensureSoftwareRecipesIsMutable(); + softwareRecipes_.remove(index); + onChanged(); + } else { + softwareRecipesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder + getSoftwareRecipesBuilder(int index) { + return getSoftwareRecipesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder + getSoftwareRecipesOrBuilder(int index) { + if (softwareRecipesBuilder_ == null) { + return softwareRecipes_.get(index); + } else { + return softwareRecipesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder> + getSoftwareRecipesOrBuilderList() { + if (softwareRecipesBuilder_ != null) { + return softwareRecipesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(softwareRecipes_); + } + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder + addSoftwareRecipesBuilder() { + return getSoftwareRecipesFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.getDefaultInstance()); + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder + addSoftwareRecipesBuilder(int index) { + return getSoftwareRecipesFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.getDefaultInstance()); + } + /** + * + * + *
+       * List of recipes assigned to the VM instance.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.EffectiveGuestPolicy.SourcedSoftwareRecipe software_recipes = 3; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder> + getSoftwareRecipesBuilderList() { + return getSoftwareRecipesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder> + getSoftwareRecipesFieldBuilder() { + if (softwareRecipesBuilder_ == null) { + softwareRecipesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipe.Builder, + com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + .SourcedSoftwareRecipeOrBuilder>( + softwareRecipes_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + softwareRecipes_ = null; + } + return softwareRecipesBuilder_; + } + + @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.v1beta.EffectiveGuestPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.EffectiveGuestPolicy) + private static final com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy(); + } + + public static com.google.cloud.osconfig.v1beta.GuestPolicies.EffectiveGuestPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EffectiveGuestPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EffectiveGuestPolicy(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.v1beta.GuestPolicies.EffectiveGuestPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GuestPolicy_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GuestPolicy_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_Assignment_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_LabelsEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_LabelsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_Package_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_Package_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_AptRepository_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_AptRepository_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_YumRepository_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_YumRepository_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ZypperRepository_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ZypperRepository_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GooRepository_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GooRepository_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PackageRepository_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PackageRepository_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/osconfig/v1beta/guest_pol" + + "icies.proto\022\034google.cloud.osconfig.v1bet" + + "a\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032 google/protobuf/f" + + "ield_mask.proto\032\037google/protobuf/timesta" + + "mp.proto\"\224\004\n\013GuestPolicy\022\021\n\004name\030\001 \001(\tB\003" + + "\340A\002\022\023\n\013description\030\002 \001(\t\0224\n\013create_time\030" + + "\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224" + + "\n\013update_time\030\004 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\022A\n\nassignment\030\006 \001(\0132(.googl" + + "e.cloud.osconfig.v1beta.AssignmentB\003\340A\002\022" + + "7\n\010packages\030\007 \003(\0132%.google.cloud.osconfi" + + "g.v1beta.Package\022M\n\024package_repositories" + + "\030\010 \003(\0132/.google.cloud.osconfig.v1beta.Pa" + + "ckageRepository\022=\n\007recipes\030\t \003(\0132,.googl" + + "e.cloud.osconfig.v1beta.SoftwareRecipe\022\014" + + "\n\004etag\030\n \001(\t:Y\352AV\n#osconfig.googleapis.c" + + "om/GuestPolicy\022/projects/{project}/guest" + + "Policies/{guest_policy}\"\271\003\n\nAssignment\022I" + + "\n\014group_labels\030\001 \003(\01323.google.cloud.osco" + + "nfig.v1beta.Assignment.GroupLabel\022\r\n\005zon" + + "es\030\002 \003(\t\022\021\n\tinstances\030\003 \003(\t\022\036\n\026instance_" + + "name_prefixes\030\004 \003(\t\022A\n\010os_types\030\005 \003(\0132/." + + "google.cloud.osconfig.v1beta.Assignment." + + "OsType\032\214\001\n\nGroupLabel\022O\n\006labels\030\001 \003(\0132?." + + "google.cloud.osconfig.v1beta.Assignment." + + "GroupLabel.LabelsEntry\032-\n\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032L\n\006OsType\022" + + "\025\n\ros_short_name\030\001 \001(\t\022\022\n\nos_version\030\002 \001" + + "(\t\022\027\n\017os_architecture\030\003 \001(\t\"\363\001\n\007Package\022" + + "\021\n\004name\030\001 \001(\tB\003\340A\002\022A\n\rdesired_state\030\002 \001(" + + "\0162*.google.cloud.osconfig.v1beta.Desired" + + "State\022>\n\007manager\030\003 \001(\0162-.google.cloud.os" + + "config.v1beta.Package.Manager\"R\n\007Manager" + + "\022\027\n\023MANAGER_UNSPECIFIED\020\000\022\007\n\003ANY\020\001\022\007\n\003AP" + + "T\020\002\022\007\n\003YUM\020\003\022\n\n\006ZYPPER\020\004\022\007\n\003GOO\020\005\"\370\001\n\rAp" + + "tRepository\022M\n\014archive_type\030\001 \001(\01627.goog" + + "le.cloud.osconfig.v1beta.AptRepository.A" + + "rchiveType\022\020\n\003uri\030\002 \001(\tB\003\340A\002\022\031\n\014distribu" + + "tion\030\003 \001(\tB\003\340A\002\022\027\n\ncomponents\030\004 \003(\tB\003\340A\002" + + "\022\017\n\007gpg_key\030\005 \001(\t\"A\n\013ArchiveType\022\034\n\030ARCH" + + "IVE_TYPE_UNSPECIFIED\020\000\022\007\n\003DEB\020\001\022\013\n\007DEB_S" + + "RC\020\002\"_\n\rYumRepository\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024" + + "\n\014display_name\030\002 \001(\t\022\025\n\010base_url\030\003 \001(\tB\003" + + "\340A\002\022\020\n\010gpg_keys\030\004 \003(\t\"b\n\020ZypperRepositor" + + "y\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\024\n\014display_name\030\002 \001(\t" + + "\022\025\n\010base_url\030\003 \001(\tB\003\340A\002\022\020\n\010gpg_keys\030\004 \003(" + + "\t\"4\n\rGooRepository\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\020\n" + + "\003url\030\002 \001(\tB\003\340A\002\"\227\002\n\021PackageRepository\022:\n" + + "\003apt\030\001 \001(\0132+.google.cloud.osconfig.v1bet" + + "a.AptRepositoryH\000\022:\n\003yum\030\002 \001(\0132+.google." + + "cloud.osconfig.v1beta.YumRepositoryH\000\022@\n" + + "\006zypper\030\003 \001(\0132..google.cloud.osconfig.v1" + + "beta.ZypperRepositoryH\000\022:\n\003goo\030\004 \001(\0132+.g" + + "oogle.cloud.osconfig.v1beta.GooRepositor" + + "yH\000B\014\n\nrepository\"\206\021\n\016SoftwareRecipe\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\002\022\017\n\007version\030\002 \001(\t\022H\n\tarti" + + "facts\030\003 \003(\01325.google.cloud.osconfig.v1be" + + "ta.SoftwareRecipe.Artifact\022H\n\rinstall_st" + + "eps\030\004 \003(\01321.google.cloud.osconfig.v1beta" + + ".SoftwareRecipe.Step\022G\n\014update_steps\030\005 \003" + + "(\01321.google.cloud.osconfig.v1beta.Softwa" + + "reRecipe.Step\022A\n\rdesired_state\030\006 \001(\0162*.g" + + "oogle.cloud.osconfig.v1beta.DesiredState" + + "\032\275\002\n\010Artifact\022\017\n\002id\030\001 \001(\tB\003\340A\002\022N\n\006remote" + + "\030\002 \001(\0132<.google.cloud.osconfig.v1beta.So" + + "ftwareRecipe.Artifact.RemoteH\000\022H\n\003gcs\030\003 " + + "\001(\01329.google.cloud.osconfig.v1beta.Softw" + + "areRecipe.Artifact.GcsH\000\022\026\n\016allow_insecu" + + "re\030\004 \001(\010\032\'\n\006Remote\022\013\n\003uri\030\001 \001(\t\022\020\n\010check" + + "sum\030\002 \001(\t\0329\n\003Gcs\022\016\n\006bucket\030\001 \001(\t\022\016\n\006obje" + + "ct\030\002 \001(\t\022\022\n\ngeneration\030\003 \001(\003B\n\n\010artifact" + + "\032\357\013\n\004Step\022O\n\tfile_copy\030\001 \001(\0132:.google.cl" + + "oud.osconfig.v1beta.SoftwareRecipe.Step." + + "CopyFileH\000\022^\n\022archive_extraction\030\002 \001(\0132@" + + ".google.cloud.osconfig.v1beta.SoftwareRe" + + "cipe.Step.ExtractArchiveH\000\022X\n\020msi_instal" + + "lation\030\003 \001(\0132<.google.cloud.osconfig.v1b" + + "eta.SoftwareRecipe.Step.InstallMsiH\000\022Z\n\021" + + "dpkg_installation\030\004 \001(\0132=.google.cloud.o" + + "sconfig.v1beta.SoftwareRecipe.Step.Insta" + + "llDpkgH\000\022X\n\020rpm_installation\030\005 \001(\0132<.goo" + + "gle.cloud.osconfig.v1beta.SoftwareRecipe" + + ".Step.InstallRpmH\000\022O\n\tfile_exec\030\006 \001(\0132:." + + "google.cloud.osconfig.v1beta.SoftwareRec" + + "ipe.Step.ExecFileH\000\022Q\n\nscript_run\030\007 \001(\0132" + + ";.google.cloud.osconfig.v1beta.SoftwareR" + + "ecipe.Step.RunScriptH\000\032f\n\010CopyFile\022\030\n\013ar" + + "tifact_id\030\001 \001(\tB\003\340A\002\022\030\n\013destination\030\002 \001(" + + "\tB\003\340A\002\022\021\n\toverwrite\030\003 \001(\010\022\023\n\013permissions" + + "\030\004 \001(\t\032\225\002\n\016ExtractArchive\022\030\n\013artifact_id" + + "\030\001 \001(\tB\003\340A\002\022\023\n\013destination\030\002 \001(\t\022_\n\004type" + + "\030\003 \001(\0162L.google.cloud.osconfig.v1beta.So" + + "ftwareRecipe.Step.ExtractArchive.Archive" + + "TypeB\003\340A\002\"s\n\013ArchiveType\022\034\n\030ARCHIVE_TYPE" + + "_UNSPECIFIED\020\000\022\007\n\003TAR\020\001\022\014\n\010TAR_GZIP\020\002\022\014\n" + + "\010TAR_BZIP\020\003\022\014\n\010TAR_LZMA\020\004\022\n\n\006TAR_XZ\020\005\022\007\n" + + "\003ZIP\020\013\032Q\n\nInstallMsi\022\030\n\013artifact_id\030\001 \001(" + + "\tB\003\340A\002\022\r\n\005flags\030\002 \003(\t\022\032\n\022allowed_exit_co" + + "des\030\003 \003(\005\032\'\n\013InstallDpkg\022\030\n\013artifact_id\030" + + "\001 \001(\tB\003\340A\002\032&\n\nInstallRpm\022\030\n\013artifact_id\030" + + "\001 \001(\tB\003\340A\002\032r\n\010ExecFile\022\025\n\013artifact_id\030\001 " + + "\001(\tH\000\022\024\n\nlocal_path\030\002 \001(\tH\000\022\014\n\004args\030\003 \003(" + + "\t\022\032\n\022allowed_exit_codes\030\004 \003(\005B\017\n\rlocatio" + + "n_type\032\341\001\n\tRunScript\022\023\n\006script\030\001 \001(\tB\003\340A" + + "\002\022\032\n\022allowed_exit_codes\030\002 \003(\005\022\\\n\013interpr" + + "eter\030\003 \001(\0162G.google.cloud.osconfig.v1bet" + + "a.SoftwareRecipe.Step.RunScript.Interpre" + + "ter\"E\n\013Interpreter\022\033\n\027INTERPRETER_UNSPEC" + + "IFIED\020\000\022\t\n\005SHELL\020\001\022\016\n\nPOWERSHELL\020\003B\006\n\004st" + + "ep\"\273\001\n\030CreateGuestPolicyRequest\022;\n\006paren" + + "t\030\001 \001(\tB+\340A\002\372A%\022#osconfig.googleapis.com" + + "/GuestPolicy\022\034\n\017guest_policy_id\030\002 \001(\tB\003\340" + + "A\002\022D\n\014guest_policy\030\003 \001(\0132).google.cloud." + + "osconfig.v1beta.GuestPolicyB\003\340A\002\"R\n\025GetG" + + "uestPolicyRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" + + "#osconfig.googleapis.com/GuestPolicy\"~\n\030" + + "ListGuestPoliciesRequest\022;\n\006parent\030\001 \001(\t" + + "B+\340A\002\372A%\022#osconfig.googleapis.com/GuestP" + + "olicy\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\"w\n\031ListGuestPoliciesResponse\022A\n\016gue" + + "st_policies\030\001 \003(\0132).google.cloud.osconfi" + + "g.v1beta.GuestPolicy\022\027\n\017next_page_token\030" + + "\002 \001(\t\"\221\001\n\030UpdateGuestPolicyRequest\022D\n\014gu" + + "est_policy\030\001 \001(\0132).google.cloud.osconfig" + + ".v1beta.GuestPolicyB\003\340A\002\022/\n\013update_mask\030" + + "\002 \001(\0132\032.google.protobuf.FieldMask\"U\n\030Del" + + "eteGuestPolicyRequest\0229\n\004name\030\001 \001(\tB+\340A\002" + + "\372A%\n#osconfig.googleapis.com/GuestPolicy" + + "\"~\n!LookupEffectiveGuestPolicyRequest\022\025\n" + + "\010instance\030\001 \001(\tB\003\340A\002\022\025\n\ros_short_name\030\002 " + + "\001(\t\022\022\n\nos_version\030\003 \001(\t\022\027\n\017os_architectu" + + "re\030\004 \001(\t\"\375\004\n\024EffectiveGuestPolicy\022S\n\010pac" + + "kages\030\001 \003(\0132A.google.cloud.osconfig.v1be" + + "ta.EffectiveGuestPolicy.SourcedPackage\022i" + + "\n\024package_repositories\030\002 \003(\0132K.google.cl" + + "oud.osconfig.v1beta.EffectiveGuestPolicy" + + ".SourcedPackageRepository\022b\n\020software_re" + + "cipes\030\003 \003(\0132H.google.cloud.osconfig.v1be" + + "ta.EffectiveGuestPolicy.SourcedSoftwareR" + + "ecipe\032X\n\016SourcedPackage\022\016\n\006source\030\001 \001(\t\022" + + "6\n\007package\030\002 \001(\0132%.google.cloud.osconfig" + + ".v1beta.Package\032w\n\030SourcedPackageReposit" + + "ory\022\016\n\006source\030\001 \001(\t\022K\n\022package_repositor" + + "y\030\002 \001(\0132/.google.cloud.osconfig.v1beta.P" + + "ackageRepository\032n\n\025SourcedSoftwareRecip" + + "e\022\016\n\006source\030\001 \001(\t\022E\n\017software_recipe\030\002 \001" + + "(\0132,.google.cloud.osconfig.v1beta.Softwa" + + "reRecipe*V\n\014DesiredState\022\035\n\031DESIRED_STAT" + + "E_UNSPECIFIED\020\000\022\r\n\tINSTALLED\020\001\022\013\n\007UPDATE" + + "D\020\002\022\013\n\007REMOVED\020\003Bw\n com.google.cloud.osc" + + "onfig.v1betaB\rGuestPoliciesZDgoogle.gola" + + "ng.org/genproto/googleapis/cloud/osconfi" + + "g/v1beta;osconfigb\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.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_osconfig_v1beta_GuestPolicy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_GuestPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GuestPolicy_descriptor, + new java.lang.String[] { + "Name", + "Description", + "CreateTime", + "UpdateTime", + "Assignment", + "Packages", + "PackageRepositories", + "Recipes", + "Etag", + }); + internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1beta_Assignment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor, + new java.lang.String[] { + "GroupLabels", "Zones", "Instances", "InstanceNamePrefixes", "OsTypes", + }); + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_descriptor = + internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_descriptor, + new java.lang.String[] { + "Labels", + }); + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_LabelsEntry_descriptor = + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_Assignment_GroupLabel_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_descriptor = + internal_static_google_cloud_osconfig_v1beta_Assignment_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_Assignment_OsType_descriptor, + new java.lang.String[] { + "OsShortName", "OsVersion", "OsArchitecture", + }); + internal_static_google_cloud_osconfig_v1beta_Package_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1beta_Package_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_Package_descriptor, + new java.lang.String[] { + "Name", "DesiredState", "Manager", + }); + internal_static_google_cloud_osconfig_v1beta_AptRepository_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1beta_AptRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_AptRepository_descriptor, + new java.lang.String[] { + "ArchiveType", "Uri", "Distribution", "Components", "GpgKey", + }); + internal_static_google_cloud_osconfig_v1beta_YumRepository_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1beta_YumRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_YumRepository_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "BaseUrl", "GpgKeys", + }); + internal_static_google_cloud_osconfig_v1beta_ZypperRepository_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1beta_ZypperRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ZypperRepository_descriptor, + new java.lang.String[] { + "Id", "DisplayName", "BaseUrl", "GpgKeys", + }); + internal_static_google_cloud_osconfig_v1beta_GooRepository_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1beta_GooRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GooRepository_descriptor, + new java.lang.String[] { + "Name", "Url", + }); + internal_static_google_cloud_osconfig_v1beta_PackageRepository_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1beta_PackageRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PackageRepository_descriptor, + new java.lang.String[] { + "Apt", "Yum", "Zypper", "Goo", "Repository", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor, + new java.lang.String[] { + "Name", "Version", "Artifacts", "InstallSteps", "UpdateSteps", "DesiredState", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor, + new java.lang.String[] { + "Id", "Remote", "Gcs", "AllowInsecure", "Artifact", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Remote_descriptor, + new java.lang.String[] { + "Uri", "Checksum", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Artifact_Gcs_descriptor, + new java.lang.String[] { + "Bucket", "Object", "Generation", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor, + new java.lang.String[] { + "FileCopy", + "ArchiveExtraction", + "MsiInstallation", + "DpkgInstallation", + "RpmInstallation", + "FileExec", + "ScriptRun", + "Step", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_CopyFile_descriptor, + new java.lang.String[] { + "ArtifactId", "Destination", "Overwrite", "Permissions", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExtractArchive_descriptor, + new java.lang.String[] { + "ArtifactId", "Destination", "Type", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallMsi_descriptor, + new java.lang.String[] { + "ArtifactId", "Flags", "AllowedExitCodes", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallDpkg_descriptor, + new java.lang.String[] { + "ArtifactId", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_InstallRpm_descriptor, + new java.lang.String[] { + "ArtifactId", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_ExecFile_descriptor, + new java.lang.String[] { + "ArtifactId", "LocalPath", "Args", "AllowedExitCodes", "LocationType", + }); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_descriptor = + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_SoftwareRecipe_Step_RunScript_descriptor, + new java.lang.String[] { + "Script", "AllowedExitCodes", "Interpreter", + }); + internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_CreateGuestPolicyRequest_descriptor, + new java.lang.String[] { + "Parent", "GuestPolicyId", "GuestPolicy", + }); + internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GetGuestPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListGuestPoliciesResponse_descriptor, + new java.lang.String[] { + "GuestPolicies", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_UpdateGuestPolicyRequest_descriptor, + new java.lang.String[] { + "GuestPolicy", "UpdateMask", + }); + internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_DeleteGuestPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_LookupEffectiveGuestPolicyRequest_descriptor, + new java.lang.String[] { + "Instance", "OsShortName", "OsVersion", "OsArchitecture", + }); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor, + new java.lang.String[] { + "Packages", "PackageRepositories", "SoftwareRecipes", + }); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_descriptor = + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackage_descriptor, + new java.lang.String[] { + "Source", "Package", + }); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_descriptor = + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedPackageRepository_descriptor, + new java.lang.String[] { + "Source", "PackageRepository", + }); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_descriptor = + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_EffectiveGuestPolicy_SourcedSoftwareRecipe_descriptor, + new java.lang.String[] { + "Source", "SoftwareRecipe", + }); + 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.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicyName.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicyName.java new file mode 100644 index 00000000..e2174187 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/GuestPolicyName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class GuestPolicyName implements ResourceName { + private static final PathTemplate PROJECT_GUEST_POLICY = + PathTemplate.createWithoutUrlEncoding("projects/{project}/guestPolicies/{guest_policy}"); + private volatile Map fieldValuesMap; + private final String project; + private final String guestPolicy; + + @Deprecated + protected GuestPolicyName() { + project = null; + guestPolicy = null; + } + + private GuestPolicyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + guestPolicy = Preconditions.checkNotNull(builder.getGuestPolicy()); + } + + public String getProject() { + return project; + } + + public String getGuestPolicy() { + return guestPolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static GuestPolicyName of(String project, String guestPolicy) { + return newBuilder().setProject(project).setGuestPolicy(guestPolicy).build(); + } + + public static String format(String project, String guestPolicy) { + return newBuilder().setProject(project).setGuestPolicy(guestPolicy).build().toString(); + } + + public static GuestPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_GUEST_POLICY.validatedMatch( + formattedString, "GuestPolicyName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("guest_policy")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (GuestPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_GUEST_POLICY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (guestPolicy != null) { + fieldMapBuilder.put("guest_policy", guestPolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_GUEST_POLICY.instantiate("project", project, "guest_policy", guestPolicy); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + GuestPolicyName that = ((GuestPolicyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.guestPolicy, that.guestPolicy); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(guestPolicy); + return h; + } + + /** Builder for projects/{project}/guestPolicies/{guest_policy}. */ + public static class Builder { + private String project; + private String guestPolicy; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getGuestPolicy() { + return guestPolicy; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setGuestPolicy(String guestPolicy) { + this.guestPolicy = guestPolicy; + return this; + } + + private Builder(GuestPolicyName guestPolicyName) { + project = guestPolicyName.project; + guestPolicy = guestPolicyName.guestPolicy; + } + + public GuestPolicyName build() { + return new GuestPolicyName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java new file mode 100644 index 00000000..51ded9b3 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigProto.java @@ -0,0 +1,152 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1beta/osconfig_service.proto + +package com.google.cloud.osconfig.v1beta; + +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 = { + "\n3google/cloud/osconfig/v1beta/osconfig_" + + "service.proto\022\034google.cloud.osconfig.v1b" + + "eta\032\034google/api/annotations.proto\032\027googl" + + "e/api/client.proto\0321google/cloud/osconfi" + + "g/v1beta/guest_policies.proto\0324google/cl" + + "oud/osconfig/v1beta/patch_deployments.pr" + + "oto\032-google/cloud/osconfig/v1beta/patch_" + + "jobs.proto\032\033google/protobuf/empty.proto2" + + "\201\027\n\017OsConfigService\022\251\001\n\017ExecutePatchJob\022" + + "4.google.cloud.osconfig.v1beta.ExecutePa" + + "tchJobRequest\032&.google.cloud.osconfig.v1" + + "beta.PatchJob\"8\202\323\344\223\0022\"-/v1beta/{parent=p" + + "rojects/*}/patchJobs:execute:\001*\022\226\001\n\013GetP" + + "atchJob\0220.google.cloud.osconfig.v1beta.G" + + "etPatchJobRequest\032&.google.cloud.osconfi" + + "g.v1beta.PatchJob\"-\202\323\344\223\002\'\022%/v1beta/{name" + + "=projects/*/patchJobs/*}\022\246\001\n\016CancelPatch" + + "Job\0223.google.cloud.osconfig.v1beta.Cance" + + "lPatchJobRequest\032&.google.cloud.osconfig" + + ".v1beta.PatchJob\"7\202\323\344\223\0021\",/v1beta/{name=" + + "projects/*/patchJobs/*}:cancel:\001*\022\247\001\n\rLi" + + "stPatchJobs\0222.google.cloud.osconfig.v1be" + + "ta.ListPatchJobsRequest\0323.google.cloud.o" + + "sconfig.v1beta.ListPatchJobsResponse\"-\202\323" + + "\344\223\002\'\022%/v1beta/{parent=projects/*}/patchJ" + + "obs\022\354\001\n\033ListPatchJobInstanceDetails\022@.go" + + "ogle.cloud.osconfig.v1beta.ListPatchJobI" + + "nstanceDetailsRequest\032A.google.cloud.osc" + + "onfig.v1beta.ListPatchJobInstanceDetails" + + "Response\"H\202\323\344\223\0029\0227/v1beta/{parent=projec" + + "ts/*/patchJobs/*}/instanceDetails\332A\006pare" + + "nt\022\312\001\n\025CreatePatchDeployment\022:.google.cl" + + "oud.osconfig.v1beta.CreatePatchDeploymen" + + "tRequest\032-.google.cloud.osconfig.v1beta." + + "PatchDeployment\"F\202\323\344\223\002@\",/v1beta/{parent" + + "=projects/*}/patchDeployments:\020patch_dep" + + "loyment\022\262\001\n\022GetPatchDeployment\0227.google." + + "cloud.osconfig.v1beta.GetPatchDeployment" + + "Request\032-.google.cloud.osconfig.v1beta.P" + + "atchDeployment\"4\202\323\344\223\002.\022,/v1beta/{name=pr" + + "ojects/*/patchDeployments/*}\022\303\001\n\024ListPat" + + "chDeployments\0229.google.cloud.osconfig.v1" + + "beta.ListPatchDeploymentsRequest\032:.googl" + + "e.cloud.osconfig.v1beta.ListPatchDeploym" + + "entsResponse\"4\202\323\344\223\002.\022,/v1beta/{parent=pr" + + "ojects/*}/patchDeployments\022\241\001\n\025DeletePat" + + "chDeployment\022:.google.cloud.osconfig.v1b" + + "eta.DeletePatchDeploymentRequest\032\026.googl" + + "e.protobuf.Empty\"4\202\323\344\223\002.*,/v1beta/{name=" + + "projects/*/patchDeployments/*}\022\316\001\n\021Creat" + + "eGuestPolicy\0226.google.cloud.osconfig.v1b" + + "eta.CreateGuestPolicyRequest\032).google.cl" + + "oud.osconfig.v1beta.GuestPolicy\"V\202\323\344\223\0029\"" + + ")/v1beta/{parent=projects/*}/guestPolici" + + "es:\014guest_policy\332A\024parent, guest_policy\022" + + "\252\001\n\016GetGuestPolicy\0223.google.cloud.osconf" + + "ig.v1beta.GetGuestPolicyRequest\032).google" + + ".cloud.osconfig.v1beta.GuestPolicy\"8\202\323\344\223" + + "\002+\022)/v1beta/{name=projects/*/guestPolici" + + "es/*}\332A\004name\022\300\001\n\021ListGuestPolicies\0226.goo" + + "gle.cloud.osconfig.v1beta.ListGuestPolic" + + "iesRequest\0327.google.cloud.osconfig.v1bet" + + "a.ListGuestPoliciesResponse\":\202\323\344\223\002+\022)/v1" + + "beta/{parent=projects/*}/guestPolicies\332A" + + "\006parent\022\337\001\n\021UpdateGuestPolicy\0226.google.c" + + "loud.osconfig.v1beta.UpdateGuestPolicyRe" + + "quest\032).google.cloud.osconfig.v1beta.Gue" + + "stPolicy\"g\202\323\344\223\002F26/v1beta/{guest_policy." + + "name=projects/*/guestPolicies/*}:\014guest_" + + "policy\332A\030guest_policy,update_mask\022\235\001\n\021De" + + "leteGuestPolicy\0226.google.cloud.osconfig." + + "v1beta.DeleteGuestPolicyRequest\032\026.google" + + ".protobuf.Empty\"8\202\323\344\223\002+*)/v1beta/{name=p" + + "rojects/*/guestPolicies/*}\332A\004name\022\352\001\n\032Lo" + + "okupEffectiveGuestPolicy\022?.google.cloud." + + "osconfig.v1beta.LookupEffectiveGuestPoli" + + "cyRequest\0322.google.cloud.osconfig.v1beta" + + ".EffectiveGuestPolicy\"W\202\323\344\223\002Q\"L/v1beta/{" + + "instance=projects/*/zones/*/instances/*}" + + ":lookupEffectiveGuestPolicy:\001*\032K\312A\027oscon" + + "fig.googleapis.com\322A.https://www.googlea" + + "pis.com/auth/cloud-platformBw\n com.googl" + + "e.cloud.osconfig.v1betaB\rOsConfigProtoZD" + + "google.golang.org/genproto/googleapis/cl" + + "oud/osconfig/v1beta;osconfigb\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.v1beta.GuestPolicies.getDescriptor(), + com.google.cloud.osconfig.v1beta.PatchDeployments.getDescriptor(), + com.google.cloud.osconfig.v1beta.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.v1beta.GuestPolicies.getDescriptor(); + com.google.cloud.osconfig.v1beta.PatchDeployments.getDescriptor(); + com.google.cloud.osconfig.v1beta.PatchJobs.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java new file mode 100644 index 00000000..aefc28be --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchDeployments.java @@ -0,0 +1,16172 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1beta/patch_deployments.proto + +package com.google.cloud.osconfig.v1beta; + +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.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter(); + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The patchConfig. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig(); + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oneTimeSchedule. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule getOneTimeSchedule(); + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder + getOneTimeScheduleOrBuilder(); + + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringSchedule. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule getRecurringSchedule(); + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchDeployment} + */ + public static final class PatchDeployment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.Builder subBuilder = + null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instanceFilter_); + instanceFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder subBuilder = null; + if (patchConfig_ != null) { + subBuilder = patchConfig_.toBuilder(); + } + patchConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule.Builder + subBuilder = null; + if (scheduleCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) + schedule_) + .toBuilder(); + } + schedule_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) + schedule_); + schedule_ = subBuilder.buildPartial(); + } + scheduleCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder + subBuilder = null; + if (scheduleCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule) + schedule_) + .toBuilder(); + } + schedule_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * 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. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * 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.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. 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. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FILTER_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter instanceFilter_; + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + @java.lang.Override + public boolean hasInstanceFilter() { + return instanceFilter_ != null; + } + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+     * Required. VM instances to patch.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int PATCH_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig patchConfig_; + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the patchConfig field is set. + */ + @java.lang.Override + public boolean hasPatchConfig() { + return patchConfig_ != null; + } + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The patchConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig() { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + /** + * + * + *
+     * Optional. Patch configuration that is applied.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the oneTimeSchedule field is set. + */ + @java.lang.Override + public boolean hasOneTimeSchedule() { + return scheduleCase_ == 6; + } + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oneTimeSchedule. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule getOneTimeSchedule() { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule a one-time execution.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder + getOneTimeScheduleOrBuilder() { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.getDefaultInstance(); + } + + public static final int RECURRING_SCHEDULE_FIELD_NUMBER = 7; + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringSchedule field is set. + */ + @java.lang.Override + public boolean hasRecurringSchedule() { + return scheduleCase_ == 7; + } + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringSchedule. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + getRecurringSchedule() { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule recurring executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringScheduleOrBuilder + getRecurringScheduleOrBuilder() { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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.v1beta.PatchDeployments.OneTimeSchedule) schedule_); + } + if (scheduleCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule) schedule_); + } + if (scheduleCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchDeployment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchDeployment) + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } else { + return instanceFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder + getInstanceFilterBuilder() { + + onChanged(); + return getInstanceFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+       * Required. VM instances to patch.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig patchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder> + patchConfigBuilder_; + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig() { + if (patchConfigBuilder_ == null) { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } else { + return patchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPatchConfig(com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPatchConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePatchConfig( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (patchConfig_ != null) { + patchConfig_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder + getPatchConfigBuilder() { + + onChanged(); + return getPatchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder + getPatchConfigOrBuilder() { + if (patchConfigBuilder_ != null) { + return patchConfigBuilder_.getMessageOrBuilder(); + } else { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + } + /** + * + * + *
+       * Optional. Patch configuration that is applied.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder> + getPatchConfigFieldBuilder() { + if (patchConfigBuilder_ == null) { + patchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder> + oneTimeScheduleBuilder_; + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the oneTimeSchedule field is set. + */ + @java.lang.Override + public boolean hasOneTimeSchedule() { + return scheduleCase_ == 6; + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oneTimeSchedule. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + getOneTimeSchedule() { + if (oneTimeScheduleBuilder_ == null) { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + .getDefaultInstance(); + } else { + if (scheduleCase_ == 6) { + return oneTimeScheduleBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOneTimeSchedule( + com.google.cloud.osconfig.v1beta.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.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOneTimeSchedule( + com.google.cloud.osconfig.v1beta.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.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOneTimeSchedule( + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule value) { + if (oneTimeScheduleBuilder_ == null) { + if (scheduleCase_ == 6 + && schedule_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + .getDefaultInstance()) { + schedule_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.newBuilder( + (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.Builder + getOneTimeScheduleBuilder() { + return getOneTimeScheduleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder + getOneTimeScheduleOrBuilder() { + if ((scheduleCase_ == 6) && (oneTimeScheduleBuilder_ != null)) { + return oneTimeScheduleBuilder_.getMessageOrBuilder(); + } else { + if (scheduleCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule a one-time execution.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder> + getOneTimeScheduleFieldBuilder() { + if (oneTimeScheduleBuilder_ == null) { + if (!(scheduleCase_ == 6)) { + schedule_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + .getDefaultInstance(); + } + oneTimeScheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder>( + (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) schedule_, + getParentForChildren(), + isClean()); + schedule_ = null; + } + scheduleCase_ = 6; + onChanged(); + ; + return oneTimeScheduleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringScheduleOrBuilder> + recurringScheduleBuilder_; + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the recurringSchedule field is set. + */ + @java.lang.Override + public boolean hasRecurringSchedule() { + return scheduleCase_ == 7; + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurringSchedule. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + getRecurringSchedule() { + if (recurringScheduleBuilder_ == null) { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } else { + if (scheduleCase_ == 7) { + return recurringScheduleBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecurringSchedule( + com.google.cloud.osconfig.v1beta.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.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRecurringSchedule( + com.google.cloud.osconfig.v1beta.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.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRecurringSchedule( + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule value) { + if (recurringScheduleBuilder_ == null) { + if (scheduleCase_ == 7 + && schedule_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance()) { + schedule_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.newBuilder( + (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder + getRecurringScheduleBuilder() { + return getRecurringScheduleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringScheduleOrBuilder + getRecurringScheduleOrBuilder() { + if ((scheduleCase_ == 7) && (recurringScheduleBuilder_ != null)) { + return recurringScheduleBuilder_.getMessageOrBuilder(); + } else { + if (scheduleCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule) schedule_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule recurring executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringScheduleOrBuilder> + getRecurringScheduleFieldBuilder() { + if (recurringScheduleBuilder_ == null) { + if (!(scheduleCase_ == 7)) { + schedule_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + recurringScheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringScheduleOrBuilder>( + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchDeployment) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OneTimeScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.OneTimeSchedule} + */ + public static final class OneTimeSchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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.v1beta.PatchDeployments.OneTimeSchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.OneTimeSchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.OneTimeSchedule) + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.OneTimeSchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.OneTimeSchedule) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchDeployments.OneTimeSchedule(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.OneTimeSchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RecurringScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The frequency. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency getFrequency(); + + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekly. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule getWeekly(); + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder getWeeklyOrBuilder(); + + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The monthly. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule getMonthly(); + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule.ScheduleConfigCase + getScheduleConfigCase(); + } + /** + * + * + *
+   * Sets the time for recurring patch deployments.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.RecurringSchedule} + */ + public static final class RecurringSchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule.Builder + subBuilder = null; + if (scheduleConfigCase_ == 6) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) + scheduleConfig_) + .toBuilder(); + } + scheduleConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) + scheduleConfig_); + scheduleConfig_ = subBuilder.buildPartial(); + } + scheduleConfigCase_ = 6; + break; + } + case 58: + { + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.Builder + subBuilder = null; + if (scheduleConfigCase_ == 7) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule) + scheduleConfig_) + .toBuilder(); + } + scheduleConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder.class); + } + + /** + * + * + *
+     * Specifies the frequency of the recurring patch deployments.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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.v1beta.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for frequency. + */ + @java.lang.Override + public int getFrequencyValue() { + return frequency_; + } + /** + * + * + *
+     * Required. The frequency unit of this recurring schedule.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The frequency. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency + getFrequency() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency result = + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency.valueOf( + frequency_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency + .UNRECOGNIZED + : result; + } + + public static final int WEEKLY_FIELD_NUMBER = 6; + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekly field is set. + */ + @java.lang.Override + public boolean hasWeekly() { + return scheduleConfigCase_ == 6; + } + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekly. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule getWeekly() { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule with weekly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder + getWeeklyOrBuilder() { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.getDefaultInstance(); + } + + public static final int MONTHLY_FIELD_NUMBER = 7; + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the monthly field is set. + */ + @java.lang.Override + public boolean hasMonthly() { + return scheduleConfigCase_ == 7; + } + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The monthly. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule getMonthly() { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Schedule with monthly executions.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlyScheduleOrBuilder + getMonthlyOrBuilder() { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule) scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + */ + @java.lang.Override + 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.v1beta.PatchDeployments.RecurringSchedule.Frequency + .FREQUENCY_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, frequency_); + } + if (scheduleConfigCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) scheduleConfig_); + } + if (scheduleConfigCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchDeployments.WeeklySchedule) scheduleConfig_); + } + if (scheduleConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.RecurringSchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.RecurringSchedule) + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for frequency. + */ + @java.lang.Override + public int getFrequencyValue() { + return frequency_; + } + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The frequency. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency + getFrequency() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency result = + com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency.valueOf( + frequency_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule.Frequency + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The frequency unit of this recurring schedule.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchDeployments.WeeklySchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder> + weeklyBuilder_; + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekly field is set. + */ + @java.lang.Override + public boolean hasWeekly() { + return scheduleConfigCase_ == 6; + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekly. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule getWeekly() { + if (weeklyBuilder_ == null) { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) + scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + .getDefaultInstance(); + } else { + if (scheduleConfigCase_ == 6) { + return weeklyBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekly( + com.google.cloud.osconfig.v1beta.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.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekly( + com.google.cloud.osconfig.v1beta.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.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWeekly( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule value) { + if (weeklyBuilder_ == null) { + if (scheduleConfigCase_ == 6 + && scheduleConfig_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + .getDefaultInstance()) { + scheduleConfig_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.newBuilder( + (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.Builder + getWeeklyBuilder() { + return getWeeklyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder + getWeeklyOrBuilder() { + if ((scheduleConfigCase_ == 6) && (weeklyBuilder_ != null)) { + return weeklyBuilder_.getMessageOrBuilder(); + } else { + if (scheduleConfigCase_ == 6) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) + scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with weekly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder> + getWeeklyFieldBuilder() { + if (weeklyBuilder_ == null) { + if (!(scheduleConfigCase_ == 6)) { + scheduleConfig_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + .getDefaultInstance(); + } + weeklyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder>( + (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) + scheduleConfig_, + getParentForChildren(), + isClean()); + scheduleConfig_ = null; + } + scheduleConfigCase_ = 6; + onChanged(); + ; + return weeklyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlyScheduleOrBuilder> + monthlyBuilder_; + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the monthly field is set. + */ + @java.lang.Override + public boolean hasMonthly() { + return scheduleConfigCase_ == 7; + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The monthly. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule getMonthly() { + if (monthlyBuilder_ == null) { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule) + scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + .getDefaultInstance(); + } else { + if (scheduleConfigCase_ == 7) { + return monthlyBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMonthly( + com.google.cloud.osconfig.v1beta.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.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMonthly( + com.google.cloud.osconfig.v1beta.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.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMonthly( + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule value) { + if (monthlyBuilder_ == null) { + if (scheduleConfigCase_ == 7 + && scheduleConfig_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + .getDefaultInstance()) { + scheduleConfig_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.newBuilder( + (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.Builder + getMonthlyBuilder() { + return getMonthlyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlyScheduleOrBuilder + getMonthlyOrBuilder() { + if ((scheduleConfigCase_ == 7) && (monthlyBuilder_ != null)) { + return monthlyBuilder_.getMessageOrBuilder(); + } else { + if (scheduleConfigCase_ == 7) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule) + scheduleConfig_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Schedule with monthly executions.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlyScheduleOrBuilder> + getMonthlyFieldBuilder() { + if (monthlyBuilder_ == null) { + if (!(scheduleConfigCase_ == 7)) { + scheduleConfig_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + .getDefaultInstance(); + } + monthlyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlyScheduleOrBuilder>( + (com.google.cloud.osconfig.v1beta.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.v1beta.RecurringSchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.RecurringSchedule) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchDeployments.RecurringSchedule(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.RecurringSchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WeeklyScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.WeeklySchedule} + */ + public static final class WeeklySchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchDeployments.WeeklySchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.WeeklySchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.WeeklySchedule) + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklyScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.WeeklySchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.WeeklySchedule) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchDeployments.WeeklySchedule(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeeklySchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MonthlyScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.MonthlySchedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekDayOfMonth. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth getWeekDayOfMonth(); + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.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 Whether the monthDay field is set. + */ + boolean hasMonthDay(); + /** + * + * + *
+     * 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.v1beta.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.v1beta.MonthlySchedule} + */ + public static final class MonthlySchedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth.Builder + subBuilder = null; + if (dayOfMonthCase_ == 1) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth) + dayOfMonth_) + .toBuilder(); + } + dayOfMonth_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.class, + com.google.cloud.osconfig.v1beta.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.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + @java.lang.Override + public boolean hasWeekDayOfMonth() { + return dayOfMonthCase_ == 1; + } + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekDayOfMonth. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth getWeekDayOfMonth() { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.getDefaultInstance(); + } + /** + * + * + *
+     * Required. Week day in a month.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonthOrBuilder + getWeekDayOfMonthOrBuilder() { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1beta.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 Whether the monthDay field is set. + */ + @java.lang.Override + public boolean hasMonthDay() { + return dayOfMonthCase_ == 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. + */ + @java.lang.Override + 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.v1beta.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.v1beta.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.v1beta.PatchDeployments.MonthlySchedule)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.MonthlySchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.MonthlySchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.MonthlySchedule parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.MonthlySchedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.MonthlySchedule) + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlyScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.MonthlySchedule) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.MonthlySchedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonthOrBuilder> + weekDayOfMonthBuilder_; + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + @java.lang.Override + public boolean hasWeekDayOfMonth() { + return dayOfMonthCase_ == 1; + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekDayOfMonth. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth getWeekDayOfMonth() { + if (weekDayOfMonthBuilder_ == null) { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + .getDefaultInstance(); + } else { + if (dayOfMonthCase_ == 1) { + return weekDayOfMonthBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekDayOfMonth( + com.google.cloud.osconfig.v1beta.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.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWeekDayOfMonth( + com.google.cloud.osconfig.v1beta.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.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWeekDayOfMonth( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth value) { + if (weekDayOfMonthBuilder_ == null) { + if (dayOfMonthCase_ == 1 + && dayOfMonth_ + != com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + .getDefaultInstance()) { + dayOfMonth_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.newBuilder( + (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.Builder + getWeekDayOfMonthBuilder() { + return getWeekDayOfMonthFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonthOrBuilder + getWeekDayOfMonthOrBuilder() { + if ((dayOfMonthCase_ == 1) && (weekDayOfMonthBuilder_ != null)) { + return weekDayOfMonthBuilder_.getMessageOrBuilder(); + } else { + if (dayOfMonthCase_ == 1) { + return (com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth) dayOfMonth_; + } + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Required. Week day in a month.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonthOrBuilder> + getWeekDayOfMonthFieldBuilder() { + if (weekDayOfMonthBuilder_ == null) { + if (!(dayOfMonthCase_ == 1)) { + dayOfMonth_ = + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + .getDefaultInstance(); + } + weekDayOfMonthBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonthOrBuilder>( + (com.google.cloud.osconfig.v1beta.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 Whether the monthDay field is set. + */ + public boolean hasMonthDay() { + return dayOfMonthCase_ == 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; + } + /** + * + * + *
+       * 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.v1beta.MonthlySchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.MonthlySchedule) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchDeployments.MonthlySchedule(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.MonthlySchedule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WeekDayOfMonthOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.WeekDayOfMonth} + */ + public static final class WeekDayOfMonth extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchDeployments.WeekDayOfMonth)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.WeekDayOfMonth} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.WeekDayOfMonth) + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonthOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.WeekDayOfMonth) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.WeekDayOfMonth) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchDeployments.WeekDayOfMonth(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.WeekDayOfMonth + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CreatePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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.v1beta.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.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployment(); + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder(); + } + /** + * + * + *
+   * A request message for creating a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest} + */ + public static final class CreatePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment.Builder + subBuilder = null; + if (patchDeployment_ != null) { + subBuilder = patchDeployment_.toBuilder(); + } + patchDeployment_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The project to apply this patch deployment to in the form `projects/*`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchDeployments.PatchDeployment patchDeployment_; + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the patchDeployment field is set. + */ + @java.lang.Override + public boolean hasPatchDeployment() { + return patchDeployment_ != null; + } + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployment() { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.getDefaultInstance() + : patchDeployment_; + } + /** + * + * + *
+     * Required. The patch deployment to create.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.CreatePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + .class, + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.PatchDeployments.PatchDeployment patchDeployment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + patchDeploymentBuilder_; + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The patchDeployment. + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + getPatchDeployment() { + if (patchDeploymentBuilder_ == null) { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance() + : patchDeployment_; + } else { + return patchDeploymentBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPatchDeployment( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPatchDeployment( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePatchDeployment( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment value) { + if (patchDeploymentBuilder_ == null) { + if (patchDeployment_ != null) { + patchDeployment_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + getPatchDeploymentBuilder() { + + onChanged(); + return getPatchDeploymentFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder + getPatchDeploymentOrBuilder() { + if (patchDeploymentBuilder_ != null) { + return patchDeploymentBuilder_.getMessageOrBuilder(); + } else { + return patchDeployment_ == null + ? com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance() + : patchDeployment_; + } + } + /** + * + * + *
+       * Required. The patch deployment to create.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentFieldBuilder() { + if (patchDeploymentBuilder_ == null) { + patchDeploymentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.CreatePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.CreatePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .CreatePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.CreatePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.CreatePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetPatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * A request message for retrieving a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GetPatchDeploymentRequest} + */ + public static final class GetPatchDeploymentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1beta.PatchDeployments.GetPatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.GetPatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.GetPatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.GetPatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.GetPatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GetPatchDeploymentRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.GetPatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.GetPatchDeploymentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.GetPatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GetPatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.GetPatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.GetPatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchDeploymentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the parent in the form `projects/*`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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]; + * + * @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.v1beta.ListPatchDeploymentsRequest} + */ + public static final class ListPatchDeploymentsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the parent in the form `projects/*`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of patch deployments to return. Default is 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * Optional. A 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.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. A 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. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ListPatchDeploymentsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest.class, + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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. + */ + @java.lang.Override + 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.v1beta.ListPatchDeploymentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListPatchDeploymentsRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .ListPatchDeploymentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchDeploymentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListPatchDeploymentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + java.util.List + getPatchDeploymentsList(); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployments( + int index); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + int getPatchDeploymentsCount(); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentsOrBuilderList(); + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + com.google.cloud.osconfig.v1beta.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.v1beta.ListPatchDeploymentsResponse} + */ + public static final class ListPatchDeploymentsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment>(); + mutable_bitField0_ |= 0x00000001; + } + patchDeployments_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse.class, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + @java.lang.Override + public java.util.List + getPatchDeploymentsList() { + return patchDeployments_; + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentsOrBuilderList() { + return patchDeployments_; + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + @java.lang.Override + public int getPatchDeploymentsCount() { + return patchDeployments_.size(); + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment getPatchDeployments( + int index) { + return patchDeployments_.get(index); + } + /** + * + * + *
+     * The list of patch deployments.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token that can be used to get the next page of patch
+     * deployments.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < 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.v1beta.PatchDeployments.ListPatchDeploymentsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ListPatchDeploymentsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListPatchDeploymentsResponse) + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + .class, + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.PatchDeployment>( + patchDeployments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + patchDeploymentsBuilder_; + + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder setPatchDeployments( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder setPatchDeployments( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder addPatchDeployments( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public Builder addAllPatchDeployments( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + getPatchDeploymentsBuilder(int index) { + return getPatchDeploymentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + addPatchDeploymentsBuilder() { + return getPatchDeploymentsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder + addPatchDeploymentsBuilder(int index) { + return getPatchDeploymentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch deployments.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchDeployment patch_deployments = 1; + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder> + getPatchDeploymentsBuilderList() { + return getPatchDeploymentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeploymentOrBuilder> + getPatchDeploymentsFieldBuilder() { + if (patchDeploymentsBuilder_ == null) { + patchDeploymentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment, + com.google.cloud.osconfig.v1beta.PatchDeployments.PatchDeployment.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.ListPatchDeploymentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListPatchDeploymentsResponse) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .ListPatchDeploymentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.ListPatchDeploymentsResponse(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.ListPatchDeploymentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeletePatchDeploymentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * A request message for deleting a patch deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest} + */ + public static final class DeletePatchDeploymentRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the patch deployment in the form
+     * `projects/*/patchDeployments/*`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1beta.PatchDeployments.DeletePatchDeploymentRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.DeletePatchDeploymentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.DeletePatchDeploymentRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest) + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + .class, + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments + .internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + build() { + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.DeletePatchDeploymentRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.DeletePatchDeploymentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.DeletePatchDeploymentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.DeletePatchDeploymentRequest) + private static final com.google.cloud.osconfig.v1beta.PatchDeployments + .DeletePatchDeploymentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchDeployments.DeletePatchDeploymentRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchDeployments.DeletePatchDeploymentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_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 = { + "\n4google/cloud/osconfig/v1beta/patch_dep" + + "loyments.proto\022\034google.cloud.osconfig.v1" + + "beta\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\032-google/cloud/o" + + "sconfig/v1beta/patch_jobs.proto\032\036google/" + + "protobuf/duration.proto\032\037google/protobuf" + + "/timestamp.proto\032\032google/type/datetime.p" + + "roto\032\033google/type/dayofweek.proto\032\033googl" + + "e/type/timeofday.proto\"\333\004\n\017PatchDeployme" + + "nt\022\014\n\004name\030\001 \001(\t\022\030\n\013description\030\002 \001(\tB\003\340" + + "A\001\022O\n\017instance_filter\030\003 \001(\01321.google.clo" + + "ud.osconfig.v1beta.PatchInstanceFilterB\003" + + "\340A\002\022D\n\014patch_config\030\004 \001(\0132).google.cloud" + + ".osconfig.v1beta.PatchConfigB\003\340A\001\0220\n\010dur" + + "ation\030\005 \001(\0132\031.google.protobuf.DurationB\003" + + "\340A\001\022O\n\021one_time_schedule\030\006 \001(\0132-.google." + + "cloud.osconfig.v1beta.OneTimeScheduleB\003\340" + + "A\002H\000\022R\n\022recurring_schedule\030\007 \001(\0132/.googl" + + "e.cloud.osconfig.v1beta.RecurringSchedul" + + "eB\003\340A\002H\000\0224\n\013create_time\030\010 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\0224\n\013update_time\030\t " + + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022:\n\021" + + "last_execute_time\030\n \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003B\n\n\010schedule\"H\n\017OneTimeS" + + "chedule\0225\n\014execute_time\030\001 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\002\"\207\005\n\021RecurringSche" + + "dule\022-\n\ttime_zone\030\001 \001(\0132\025.google.type.Ti" + + "meZoneB\003\340A\002\0223\n\nstart_time\030\002 \001(\0132\032.google" + + ".protobuf.TimestampB\003\340A\001\0221\n\010end_time\030\003 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\001\0220\n\013t" + + "ime_of_day\030\004 \001(\0132\026.google.type.TimeOfDay" + + "B\003\340A\002\022Q\n\tfrequency\030\005 \001(\01629.google.cloud." + + "osconfig.v1beta.RecurringSchedule.Freque" + + "ncyB\003\340A\002\022C\n\006weekly\030\006 \001(\0132,.google.cloud." + + "osconfig.v1beta.WeeklyScheduleB\003\340A\002H\000\022E\n" + + "\007monthly\030\007 \001(\0132-.google.cloud.osconfig.v" + + "1beta.MonthlyScheduleB\003\340A\002H\000\022:\n\021last_exe" + + "cute_time\030\t \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022:\n\021next_execute_time\030\n \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\"?\n\tFrequenc" + + "y\022\031\n\025FREQUENCY_UNSPECIFIED\020\000\022\n\n\006WEEKLY\020\001" + + "\022\013\n\007MONTHLY\020\002B\021\n\017schedule_config\"B\n\016Week" + + "lySchedule\0220\n\013day_of_week\030\001 \001(\0162\026.google" + + ".type.DayOfWeekB\003\340A\002\"\213\001\n\017MonthlySchedule" + + "\022N\n\021week_day_of_month\030\001 \001(\0132,.google.clo" + + "ud.osconfig.v1beta.WeekDayOfMonthB\003\340A\002H\000" + + "\022\030\n\tmonth_day\030\002 \001(\005B\003\340A\002H\000B\016\n\014day_of_mon" + + "th\"]\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.ty" + + "pe.DayOfWeekB\003\340A\002\"\243\001\n\034CreatePatchDeploym" + + "entRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022 \n\023patch" + + "_deployment_id\030\002 \001(\tB\003\340A\002\022L\n\020patch_deplo" + + "yment\030\003 \001(\0132-.google.cloud.osconfig.v1be" + + "ta.PatchDeploymentB\003\340A\002\".\n\031GetPatchDeplo" + + "ymentRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"c\n\033ListP" + + "atchDeploymentsRequest\022\023\n\006parent\030\001 \001(\tB\003" + + "\340A\002\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\"\201\001\n\034ListPatchDeploymentsRes" + + "ponse\022H\n\021patch_deployments\030\001 \003(\0132-.googl" + + "e.cloud.osconfig.v1beta.PatchDeployment\022" + + "\027\n\017next_page_token\030\002 \001(\t\"1\n\034DeletePatchD" + + "eploymentRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002Bz\n c" + + "om.google.cloud.osconfig.v1betaB\020PatchDe" + + "ploymentsZDgoogle.golang.org/genproto/go" + + "ogleapis/cloud/osconfig/v1beta;osconfigb" + + "\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.v1beta.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_v1beta_PatchDeployment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchDeployment_descriptor, + new java.lang.String[] { + "Name", + "Description", + "InstanceFilter", + "PatchConfig", + "Duration", + "OneTimeSchedule", + "RecurringSchedule", + "CreateTime", + "UpdateTime", + "LastExecuteTime", + "Schedule", + }); + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_OneTimeSchedule_descriptor, + new java.lang.String[] { + "ExecuteTime", + }); + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_RecurringSchedule_descriptor, + new java.lang.String[] { + "TimeZone", + "StartTime", + "EndTime", + "TimeOfDay", + "Frequency", + "Weekly", + "Monthly", + "LastExecuteTime", + "NextExecuteTime", + "ScheduleConfig", + }); + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_WeeklySchedule_descriptor, + new java.lang.String[] { + "DayOfWeek", + }); + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_MonthlySchedule_descriptor, + new java.lang.String[] { + "WeekDayOfMonth", "MonthDay", "DayOfMonth", + }); + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_WeekDayOfMonth_descriptor, + new java.lang.String[] { + "WeekOrdinal", "DayOfWeek", + }); + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_CreatePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Parent", "PatchDeploymentId", "PatchDeployment", + }); + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GetPatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListPatchDeploymentsResponse_descriptor, + new java.lang.String[] { + "PatchDeployments", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_DeletePatchDeploymentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.osconfig.v1beta.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-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java new file mode 100644 index 00000000..747cb2e9 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/PatchJobs.java @@ -0,0 +1,35097 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/v1beta/patch_jobs.proto + +package com.google.cloud.osconfig.v1beta; + +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.v1beta.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]; + * + * @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]; + * + * @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.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter(); + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4; + * + * @return The patchConfig. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + */ + com.google.cloud.osconfig.v1beta.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.v1beta.ExecutePatchJobRequest} + */ + public static final class ExecutePatchJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig.Builder subBuilder = null; + if (patchConfig_ != null) { + subBuilder = patchConfig_.toBuilder(); + } + patchConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.Builder subBuilder = + null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The project in which to run this patch in the form `projects/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int 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. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_FILTER_FIELD_NUMBER = 7; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter instanceFilter_; + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the instanceFilter field is set. + */ + @java.lang.Override + 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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+     * Required. Instances to patch, either explicitly or filtered by some criteria such
+     * as zone or labels.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int PATCH_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig patchConfig_; + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + * + * @return Whether the patchConfig field is set. + */ + @java.lang.Override + public boolean hasPatchConfig() { + return patchConfig_ != null; + } + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + * + * @return The patchConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig() { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + /** + * + * + *
+     * Patch configuration being applied. If omitted, instances are
+     * patched using the default configurations.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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; + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Display name for this patch job. This does not have to be unique.
+     * 
+ * + * string display_name = 8; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1beta.PatchJobs.ExecutePatchJobRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ExecutePatchJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ExecutePatchJobRequest) + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.PatchJobs.PatchInstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+       * Required. Instances to patch, either explicitly or filtered by some criteria such
+       * as zone or labels.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig patchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder> + patchConfigBuilder_; + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4; + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig() { + if (patchConfigBuilder_ == null) { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } else { + return patchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + */ + public Builder setPatchConfig(com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4; + */ + public Builder setPatchConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 4; + */ + public Builder mergePatchConfig( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (patchConfig_ != null) { + patchConfig_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchConfig patch_config = 4; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder + getPatchConfigBuilder() { + + onChanged(); + return getPatchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder + getPatchConfigOrBuilder() { + if (patchConfigBuilder_ != null) { + return patchConfigBuilder_.getMessageOrBuilder(); + } else { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + } + /** + * + * + *
+       * Patch configuration being applied. If omitted, instances are
+       * patched using the default configurations.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder> + getPatchConfigFieldBuilder() { + if (patchConfigBuilder_ == null) { + patchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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.v1beta.ExecutePatchJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ExecutePatchJobRequest) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.ExecutePatchJobRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecutePatchJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetPatchJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.GetPatchJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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]; + * + * @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.v1beta.GetPatchJobRequest} + */ + public static final class GetPatchJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1beta.PatchJobs.GetPatchJobRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.GetPatchJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GetPatchJobRequest) + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest.class, + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest build() { + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.GetPatchJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GetPatchJobRequest) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.GetPatchJobRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GetPatchJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobInstanceDetailsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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.v1beta.ListPatchJobInstanceDetailsRequest} + */ + public static final class ListPatchJobInstanceDetailsRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * The maximum number of instance details records to return.  Default is 100.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+     * 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.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+     * 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. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ListPatchJobInstanceDetailsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest) + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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. + */ + @java.lang.Override + 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.v1beta.ListPatchJobInstanceDetailsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsRequest) + private static final com.google.cloud.osconfig.v1beta.PatchJobs + .ListPatchJobInstanceDetailsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobInstanceDetailsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + java.util.List + getPatchJobInstanceDetailsList(); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails getPatchJobInstanceDetails( + int index); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + int getPatchJobInstanceDetailsCount(); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + java.util.List< + ? extends com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsOrBuilderList(); + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + com.google.cloud.osconfig.v1beta.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.v1beta.ListPatchJobInstanceDetailsResponse} + */ + public static final class ListPatchJobInstanceDetailsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails>(); + mutable_bitField0_ |= 0x00000001; + } + patchJobInstanceDetails_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse.class, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + @java.lang.Override + public java.util.List + getPatchJobInstanceDetailsList() { + return patchJobInstanceDetails_; + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsOrBuilderList() { + return patchJobInstanceDetails_; + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + @java.lang.Override + public int getPatchJobInstanceDetailsCount() { + return patchJobInstanceDetails_.size(); + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails + getPatchJobInstanceDetails(int index) { + return patchJobInstanceDetails_.get(index); + } + /** + * + * + *
+     * A list of instance status.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token that can be used to get the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < 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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ListPatchJobInstanceDetailsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsResponse) + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + .class, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails>( + patchJobInstanceDetails_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetailsOrBuilder> + patchJobInstanceDetailsBuilder_; + + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder setPatchJobInstanceDetails( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder setPatchJobInstanceDetails( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addPatchJobInstanceDetails( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public Builder addAllPatchJobInstanceDetails( + java.lang.Iterable< + ? extends com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder + getPatchJobInstanceDetailsBuilder(int index) { + return getPatchJobInstanceDetailsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder + addPatchJobInstanceDetailsBuilder() { + return getPatchJobInstanceDetailsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder + addPatchJobInstanceDetailsBuilder(int index) { + return getPatchJobInstanceDetailsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails + .getDefaultInstance()); + } + /** + * + * + *
+       * A list of instance status.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.PatchJobInstanceDetails patch_job_instance_details = 1; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder> + getPatchJobInstanceDetailsBuilderList() { + return getPatchJobInstanceDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetailsOrBuilder> + getPatchJobInstanceDetailsFieldBuilder() { + if (patchJobInstanceDetailsBuilder_ == null) { + patchJobInstanceDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.ListPatchJobInstanceDetailsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListPatchJobInstanceDetailsResponse) + private static final com.google.cloud.osconfig.v1beta.PatchJobs + .ListPatchJobInstanceDetailsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobInstanceDetailsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchJobInstanceDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.PatchJobInstanceDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1; + * + * @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.v1beta.Instance.PatchState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+     * Current state of instance patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.Instance.PatchState state = 3; + * + * @return The state. + */ + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobInstanceDetails} + */ + public static final class PatchJobInstanceDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.class, + com.google.cloud.osconfig.v1beta.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; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * The instance name in the form `projects/*/zones/*/instances/*`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.Instance.PatchState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Current state of instance patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.Instance.PatchState state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState result = + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.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.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJobInstanceDetails} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchJobInstanceDetails) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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; + * + * @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; + * + * @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; + * + * @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; + * + * @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; + * + * @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.v1beta.Instance.PatchState state = 3; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.Instance.PatchState state = 3; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState result = + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.Instance.PatchState state = 3; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.PatchState value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Current state of instance patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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.v1beta.PatchJobInstanceDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchJobInstanceDetails) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobInstanceDetails(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJobInstanceDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListPatchJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. In the form of `projects/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. In the form of `projects/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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.v1beta.ListPatchJobsRequest} + */ + public static final class ListPatchJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+     * Required. In the form of `projects/*`
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+     * The maximum number of instance status to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token returned from a previous call
+     * that indicates where this listing should continue from.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+     * 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.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+     * 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. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!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.v1beta.PatchJobs.ListPatchJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ListPatchJobsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListPatchJobsRequest) + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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. + */ + @java.lang.Override + 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.v1beta.ListPatchJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListPatchJobsRequest) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListPatchJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ListPatchJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + java.util.List getPatchJobsList(); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob getPatchJobs(int index); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + int getPatchJobsCount(); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + java.util.List + getPatchJobsOrBuilderList(); + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + com.google.cloud.osconfig.v1beta.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.v1beta.ListPatchJobsResponse} + */ + public static final class ListPatchJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob>(); + mutable_bitField0_ |= 0x00000001; + } + patchJobs_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse.class, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + @java.lang.Override + public java.util.List getPatchJobsList() { + return patchJobs_; + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + @java.lang.Override + public java.util.List + getPatchJobsOrBuilderList() { + return patchJobs_; + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + @java.lang.Override + public int getPatchJobsCount() { + return patchJobs_.size(); + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob getPatchJobs(int index) { + return patchJobs_.get(index); + } + /** + * + * + *
+     * The list of patch jobs.
+     * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A pagination token that can be used to get the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < 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.v1beta.PatchJobs.ListPatchJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ListPatchJobsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ListPatchJobsResponse) + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsResponse) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobOrBuilder> + patchJobsBuilder_; + + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public Builder setPatchJobs( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public Builder setPatchJobs( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs(com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public Builder addPatchJobs( + int index, com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder getPatchJobsBuilder( + int index) { + return getPatchJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder addPatchJobsBuilder() { + return getPatchJobsFieldBuilder() + .addBuilder(com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder addPatchJobsBuilder( + int index) { + return getPatchJobsFieldBuilder() + .addBuilder( + index, com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.getDefaultInstance()); + } + /** + * + * + *
+       * The list of patch jobs.
+       * 
+ * + * repeated .google.cloud.osconfig.v1beta.PatchJob patch_jobs = 1; + */ + public java.util.List + getPatchJobsBuilderList() { + return getPatchJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobOrBuilder> + getPatchJobsFieldBuilder() { + if (patchJobsBuilder_ == null) { + patchJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.ListPatchJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ListPatchJobsResponse) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.ListPatchJobsResponse(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ListPatchJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJob.State state = 5; + * + * @return The state. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State getState(); + + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + * + * @return Whether the instanceFilter field is set. + */ + boolean hasInstanceFilter(); + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + * + * @return The instanceFilter. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter(); + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder(); + + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + * + * @return Whether the patchConfig field is set. + */ + boolean hasPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + * + * @return The patchConfig. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig(); + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + */ + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return Whether the instanceDetailsSummary field is set. + */ + boolean hasInstanceDetailsSummary(); + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return The instanceDetailsSummary. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + getInstanceDetailsSummary(); + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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.v1beta.PatchJob} + */ + public static final class PatchJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig.Builder subBuilder = null; + if (patchConfig_ != null) { + subBuilder = patchConfig_.toBuilder(); + } + patchConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + subBuilder = null; + if (instanceDetailsSummary_ != null) { + subBuilder = instanceDetailsSummary_.toBuilder(); + } + instanceDetailsSummary_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.Builder subBuilder = + null; + if (instanceFilter_ != null) { + subBuilder = instanceFilter_.toBuilder(); + } + instanceFilter_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder.class); + } + + /** + * + * + *
+     * Enumeration of the various states a patch job passes through as it
+     * executes.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob.State) + } + + public interface InstanceDetailsSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary} + */ + public static final class InstanceDetailsSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchJob.InstanceDetailsSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob + .InstanceDetailsSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Unique identifier for this patch job in the form
+     * `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int 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. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+     * Display name for this patch job. This is not a unique identifier.
+     * 
+ * + * string display_name = 14; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Description of the patch job. Length of the description is limited
+     * to 1024 characters.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int 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. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+     * Time this patch job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3; + * + * @return The createTime. + */ + @java.lang.Override + 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; + */ + @java.lang.Override + 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. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * Last time this patch job was updated.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 4; + * + * @return The updateTime. + */ + @java.lang.Override + 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; + */ + @java.lang.Override + 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.v1beta.PatchJob.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the PatchJob .
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State result = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State.UNRECOGNIZED + : result; + } + + public static final int INSTANCE_FILTER_FIELD_NUMBER = 13; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter instanceFilter_; + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + * + * @return Whether the instanceFilter field is set. + */ + @java.lang.Override + public boolean hasInstanceFilter() { + return instanceFilter_ != null; + } + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + * + * @return The instanceFilter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter() { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + /** + * + * + *
+     * Instances to patch.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + return getInstanceFilter(); + } + + public static final int PATCH_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig patchConfig_; + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + * + * @return Whether the patchConfig field is set. + */ + @java.lang.Override + public boolean hasPatchConfig() { + return patchConfig_ != null; + } + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + * + * @return The patchConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig() { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + /** + * + * + *
+     * Patch configuration being applied.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return getDuration(); + } + + public static final int INSTANCE_DETAILS_SUMMARY_FIELD_NUMBER = 9; + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + instanceDetailsSummary_; + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return Whether the instanceDetailsSummary field is set. + */ + @java.lang.Override + public boolean hasInstanceDetailsSummary() { + return instanceDetailsSummary_ != null; + } + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return The instanceDetailsSummary. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + getInstanceDetailsSummary() { + return instanceDetailsSummary_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance() + : instanceDetailsSummary_; + } + /** + * + * + *
+     * Summary of instance details.
+     * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + * @return The patchDeployment. + */ + @java.lang.Override + 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]; + * + * @return The bytes for patchDeployment. + */ + @java.lang.Override + 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.v1beta.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.v1beta.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.v1beta.PatchJobs.PatchJob)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJob} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchJob) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob.State state = 5; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchJob.State state = 5; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State result = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State.valueOf(state_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The current state of the PatchJob .
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchJob.State state = 5; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob.State state = 5; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter instanceFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder> + instanceFilterBuilder_; + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 13; + * + * @return The instanceFilter. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter getInstanceFilter() { + if (instanceFilterBuilder_ == null) { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } else { + return instanceFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 13; + */ + public Builder setInstanceFilter( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder builderForValue) { + if (instanceFilterBuilder_ == null) { + instanceFilter_ = builderForValue.build(); + onChanged(); + } else { + instanceFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + */ + public Builder mergeInstanceFilter( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter value) { + if (instanceFilterBuilder_ == null) { + if (instanceFilter_ != null) { + instanceFilter_ = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.newBuilder( + instanceFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceFilter_ = value; + } + onChanged(); + } else { + instanceFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter instance_filter = 13; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder + getInstanceFilterBuilder() { + + onChanged(); + return getInstanceFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder + getInstanceFilterOrBuilder() { + if (instanceFilterBuilder_ != null) { + return instanceFilterBuilder_.getMessageOrBuilder(); + } else { + return instanceFilter_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance() + : instanceFilter_; + } + } + /** + * + * + *
+       * Instances to patch.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchInstanceFilter instance_filter = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder> + getInstanceFilterFieldBuilder() { + if (instanceFilterBuilder_ == null) { + instanceFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder>( + getInstanceFilter(), getParentForChildren(), isClean()); + instanceFilter_ = null; + } + return instanceFilterBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig patchConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder> + patchConfigBuilder_; + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 7; + * + * @return The patchConfig. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getPatchConfig() { + if (patchConfigBuilder_ == null) { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } else { + return patchConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + */ + public Builder setPatchConfig(com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 7; + */ + public Builder setPatchConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 7; + */ + public Builder mergePatchConfig( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig value) { + if (patchConfigBuilder_ == null) { + if (patchConfig_ != null) { + patchConfig_ = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.newBuilder(patchConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + patchConfig_ = value; + } + onChanged(); + } else { + patchConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig patch_config = 7; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder + getPatchConfigBuilder() { + + onChanged(); + return getPatchConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder + getPatchConfigOrBuilder() { + if (patchConfigBuilder_ != null) { + return patchConfigBuilder_.getMessageOrBuilder(); + } else { + return patchConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance() + : patchConfig_; + } + } + /** + * + * + *
+       * Patch configuration being applied.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig patch_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder> + getPatchConfigFieldBuilder() { + if (patchConfigBuilder_ == null) { + patchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + instanceDetailsSummary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder> + instanceDetailsSummaryBuilder_; + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + * + * @return The instanceDetailsSummary. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + getInstanceDetailsSummary() { + if (instanceDetailsSummaryBuilder_ == null) { + return instanceDetailsSummary_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance() + : instanceDetailsSummary_; + } else { + return instanceDetailsSummaryBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder setInstanceDetailsSummary( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder setInstanceDetailsSummary( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public Builder mergeInstanceDetailsSummary( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary value) { + if (instanceDetailsSummaryBuilder_ == null) { + if (instanceDetailsSummary_ != null) { + instanceDetailsSummary_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.Builder + getInstanceDetailsSummaryBuilder() { + + onChanged(); + return getInstanceDetailsSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder + getInstanceDetailsSummaryOrBuilder() { + if (instanceDetailsSummaryBuilder_ != null) { + return instanceDetailsSummaryBuilder_.getMessageOrBuilder(); + } else { + return instanceDetailsSummary_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + .getDefaultInstance() + : instanceDetailsSummary_; + } + } + /** + * + * + *
+       * Summary of instance details.
+       * 
+ * + * + * .google.cloud.osconfig.v1beta.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummaryOrBuilder> + getInstanceDetailsSummaryFieldBuilder() { + if (instanceDetailsSummaryBuilder_ == null) { + instanceDetailsSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob.InstanceDetailsSummary + .Builder, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.PatchJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchJob) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.PatchJob(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.PatchConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The enum numeric value on the wire for rebootConfig. + */ + int getRebootConfigValue(); + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The rebootConfig. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig getRebootConfig(); + + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.AptSettings apt = 3; + * + * @return The apt. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings getApt(); + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder getAptOrBuilder(); + + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.YumSettings yum = 4; + * + * @return The yum. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings getYum(); + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder getYumOrBuilder(); + + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.GooSettings goo = 5; + * + * @return The goo. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings getGoo(); + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder getGooOrBuilder(); + + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ZypperSettings zypper = 6; + * + * @return The zypper. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings getZypper(); + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder getZypperOrBuilder(); + + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.WindowsUpdateSettings windows_update = 7; + * + * @return The windowsUpdate. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings getWindowsUpdate(); + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder + getWindowsUpdateOrBuilder(); + + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + * + * @return Whether the preStep field is set. + */ + boolean hasPreStep(); + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + * + * @return The preStep. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getPreStep(); + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPreStepOrBuilder(); + + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + * + * @return Whether the postStep field is set. + */ + boolean hasPostStep(); + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + * + * @return The postStep. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getPostStep(); + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + */ + com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig} + */ + public static final class PatchConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings.Builder subBuilder = null; + if (apt_ != null) { + subBuilder = apt_.toBuilder(); + } + apt_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(apt_); + apt_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.Builder subBuilder = null; + if (yum_ != null) { + subBuilder = yum_.toBuilder(); + } + yum_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(yum_); + yum_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.Builder subBuilder = null; + if (goo_ != null) { + subBuilder = goo_.toBuilder(); + } + goo_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(goo_); + goo_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.Builder subBuilder = null; + if (zypper_ != null) { + subBuilder = zypper_.toBuilder(); + } + zypper_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(zypper_); + zypper_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Builder + subBuilder = null; + if (windowsUpdate_ != null) { + subBuilder = windowsUpdate_.toBuilder(); + } + windowsUpdate_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(windowsUpdate_); + windowsUpdate_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder subBuilder = null; + if (preStep_ != null) { + subBuilder = preStep_.toBuilder(); + } + preStep_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(preStep_); + preStep_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder subBuilder = null; + if (postStep_ != null) { + subBuilder = postStep_.toBuilder(); + } + postStep_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder.class); + } + + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig.RebootConfig) + } + + public static final int REBOOT_CONFIG_FIELD_NUMBER = 1; + private int rebootConfig_; + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The enum numeric value on the wire for rebootConfig. + */ + @java.lang.Override + public int getRebootConfigValue() { + return rebootConfig_; + } + /** + * + * + *
+     * Post-patch reboot settings.
+     * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The rebootConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig getRebootConfig() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig result = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig.valueOf( + rebootConfig_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig.UNRECOGNIZED + : result; + } + + public static final int APT_FIELD_NUMBER = 3; + private com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings apt_; + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + * + * @return Whether the apt field is set. + */ + @java.lang.Override + public boolean hasApt() { + return apt_ != null; + } + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + * + * @return The apt. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings getApt() { + return apt_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.getDefaultInstance() + : apt_; + } + /** + * + * + *
+     * Apt update settings. Use this setting to override the default `apt` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder getAptOrBuilder() { + return getApt(); + } + + public static final int YUM_FIELD_NUMBER = 4; + private com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings yum_; + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + * + * @return Whether the yum field is set. + */ + @java.lang.Override + public boolean hasYum() { + return yum_ != null; + } + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + * + * @return The yum. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings getYum() { + return yum_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.getDefaultInstance() + : yum_; + } + /** + * + * + *
+     * Yum update settings. Use this setting to override the default `yum` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder getYumOrBuilder() { + return getYum(); + } + + public static final int GOO_FIELD_NUMBER = 5; + private com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings goo_; + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + * + * @return Whether the goo field is set. + */ + @java.lang.Override + public boolean hasGoo() { + return goo_ != null; + } + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + * + * @return The goo. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings getGoo() { + return goo_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.getDefaultInstance() + : goo_; + } + /** + * + * + *
+     * Goo update settings. Use this setting to override the default `goo` patch
+     * rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder getGooOrBuilder() { + return getGoo(); + } + + public static final int ZYPPER_FIELD_NUMBER = 6; + private com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings zypper_; + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + * + * @return Whether the zypper field is set. + */ + @java.lang.Override + public boolean hasZypper() { + return zypper_ != null; + } + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + * + * @return The zypper. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings getZypper() { + return zypper_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.getDefaultInstance() + : zypper_; + } + /** + * + * + *
+     * Zypper update settings. Use this setting to override the default `zypper`
+     * patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder getZypperOrBuilder() { + return getZypper(); + } + + public static final int WINDOWS_UPDATE_FIELD_NUMBER = 7; + private com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings windowsUpdate_; + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + * + * @return Whether the windowsUpdate field is set. + */ + @java.lang.Override + public boolean hasWindowsUpdate() { + return windowsUpdate_ != null; + } + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + * + * @return The windowsUpdate. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings getWindowsUpdate() { + return windowsUpdate_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.getDefaultInstance() + : windowsUpdate_; + } + /** + * + * + *
+     * Windows update settings. Use this override the default windows patch rules.
+     * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder + getWindowsUpdateOrBuilder() { + return getWindowsUpdate(); + } + + public static final int PRE_STEP_FIELD_NUMBER = 8; + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep preStep_; + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + * + * @return Whether the preStep field is set. + */ + @java.lang.Override + public boolean hasPreStep() { + return preStep_ != null; + } + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + * + * @return The preStep. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getPreStep() { + return preStep_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance() + : preStep_; + } + /** + * + * + *
+     * The `ExecStep` to run before the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPreStepOrBuilder() { + return getPreStep(); + } + + public static final int POST_STEP_FIELD_NUMBER = 9; + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep postStep_; + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + * + * @return Whether the postStep field is set. + */ + @java.lang.Override + public boolean hasPostStep() { + return postStep_ != null; + } + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + * + * @return The postStep. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getPostStep() { + return postStep_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance() + : postStep_; + } + /** + * + * + *
+     * The `ExecStep` to run after the patch update.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJobs.PatchConfig)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchConfig) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The enum numeric value on the wire for rebootConfig. + */ + @java.lang.Override + public int getRebootConfigValue() { + return rebootConfig_; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return The rebootConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig getRebootConfig() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig result = + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig.valueOf( + rebootConfig_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @param value The rebootConfig to set. + * @return This builder for chaining. + */ + public Builder setRebootConfig( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig.RebootConfig value) { + if (value == null) { + throw new NullPointerException(); + } + + rebootConfig_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Post-patch reboot settings.
+       * 
+ * + * .google.cloud.osconfig.v1beta.PatchConfig.RebootConfig reboot_config = 1; + * + * @return This builder for chaining. + */ + public Builder clearRebootConfig() { + + rebootConfig_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings apt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder> + aptBuilder_; + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.AptSettings apt = 3; + * + * @return The apt. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings getApt() { + if (aptBuilder_ == null) { + return apt_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.getDefaultInstance() + : apt_; + } else { + return aptBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + */ + public Builder setApt(com.google.cloud.osconfig.v1beta.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.v1beta.AptSettings apt = 3; + */ + public Builder setApt( + com.google.cloud.osconfig.v1beta.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.v1beta.AptSettings apt = 3; + */ + public Builder mergeApt(com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings value) { + if (aptBuilder_ == null) { + if (apt_ != null) { + apt_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.AptSettings apt = 3; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Builder getAptBuilder() { + + onChanged(); + return getAptFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder getAptOrBuilder() { + if (aptBuilder_ != null) { + return aptBuilder_.getMessageOrBuilder(); + } else { + return apt_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.getDefaultInstance() + : apt_; + } + } + /** + * + * + *
+       * Apt update settings. Use this setting to override the default `apt` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings apt = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder> + getAptFieldBuilder() { + if (aptBuilder_ == null) { + aptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder>( + getApt(), getParentForChildren(), isClean()); + apt_ = null; + } + return aptBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings yum_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder> + yumBuilder_; + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.YumSettings yum = 4; + * + * @return The yum. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings getYum() { + if (yumBuilder_ == null) { + return yum_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.getDefaultInstance() + : yum_; + } else { + return yumBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + */ + public Builder setYum(com.google.cloud.osconfig.v1beta.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.v1beta.YumSettings yum = 4; + */ + public Builder setYum( + com.google.cloud.osconfig.v1beta.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.v1beta.YumSettings yum = 4; + */ + public Builder mergeYum(com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings value) { + if (yumBuilder_ == null) { + if (yum_ != null) { + yum_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.YumSettings yum = 4; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.Builder getYumBuilder() { + + onChanged(); + return getYumFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder getYumOrBuilder() { + if (yumBuilder_ != null) { + return yumBuilder_.getMessageOrBuilder(); + } else { + return yum_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.getDefaultInstance() + : yum_; + } + } + /** + * + * + *
+       * Yum update settings. Use this setting to override the default `yum` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.YumSettings yum = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder> + getYumFieldBuilder() { + if (yumBuilder_ == null) { + yumBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder>( + getYum(), getParentForChildren(), isClean()); + yum_ = null; + } + return yumBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings goo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder> + gooBuilder_; + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.GooSettings goo = 5; + * + * @return The goo. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings getGoo() { + if (gooBuilder_ == null) { + return goo_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.getDefaultInstance() + : goo_; + } else { + return gooBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + */ + public Builder setGoo(com.google.cloud.osconfig.v1beta.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.v1beta.GooSettings goo = 5; + */ + public Builder setGoo( + com.google.cloud.osconfig.v1beta.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.v1beta.GooSettings goo = 5; + */ + public Builder mergeGoo(com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings value) { + if (gooBuilder_ == null) { + if (goo_ != null) { + goo_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.GooSettings goo = 5; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.Builder getGooBuilder() { + + onChanged(); + return getGooFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder getGooOrBuilder() { + if (gooBuilder_ != null) { + return gooBuilder_.getMessageOrBuilder(); + } else { + return goo_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.getDefaultInstance() + : goo_; + } + } + /** + * + * + *
+       * Goo update settings. Use this setting to override the default `goo` patch
+       * rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GooSettings goo = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder> + getGooFieldBuilder() { + if (gooBuilder_ == null) { + gooBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder>( + getGoo(), getParentForChildren(), isClean()); + goo_ = null; + } + return gooBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings zypper_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder> + zypperBuilder_; + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ZypperSettings zypper = 6; + * + * @return The zypper. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings getZypper() { + if (zypperBuilder_ == null) { + return zypper_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.getDefaultInstance() + : zypper_; + } else { + return zypperBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + */ + public Builder setZypper(com.google.cloud.osconfig.v1beta.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.v1beta.ZypperSettings zypper = 6; + */ + public Builder setZypper( + com.google.cloud.osconfig.v1beta.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.v1beta.ZypperSettings zypper = 6; + */ + public Builder mergeZypper(com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings value) { + if (zypperBuilder_ == null) { + if (zypper_ != null) { + zypper_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ZypperSettings zypper = 6; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.Builder getZypperBuilder() { + + onChanged(); + return getZypperFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder + getZypperOrBuilder() { + if (zypperBuilder_ != null) { + return zypperBuilder_.getMessageOrBuilder(); + } else { + return zypper_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.getDefaultInstance() + : zypper_; + } + } + /** + * + * + *
+       * Zypper update settings. Use this setting to override the default `zypper`
+       * patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ZypperSettings zypper = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder> + getZypperFieldBuilder() { + if (zypperBuilder_ == null) { + zypperBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder>( + getZypper(), getParentForChildren(), isClean()); + zypper_ = null; + } + return zypperBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings windowsUpdate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder> + windowsUpdateBuilder_; + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.WindowsUpdateSettings windows_update = 7; + * + * @return The windowsUpdate. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings getWindowsUpdate() { + if (windowsUpdateBuilder_ == null) { + return windowsUpdate_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + .getDefaultInstance() + : windowsUpdate_; + } else { + return windowsUpdateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + */ + public Builder setWindowsUpdate( + com.google.cloud.osconfig.v1beta.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.v1beta.WindowsUpdateSettings windows_update = 7; + */ + public Builder setWindowsUpdate( + com.google.cloud.osconfig.v1beta.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.v1beta.WindowsUpdateSettings windows_update = 7; + */ + public Builder mergeWindowsUpdate( + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings value) { + if (windowsUpdateBuilder_ == null) { + if (windowsUpdate_ != null) { + windowsUpdate_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.WindowsUpdateSettings windows_update = 7; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Builder + getWindowsUpdateBuilder() { + + onChanged(); + return getWindowsUpdateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder + getWindowsUpdateOrBuilder() { + if (windowsUpdateBuilder_ != null) { + return windowsUpdateBuilder_.getMessageOrBuilder(); + } else { + return windowsUpdate_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + .getDefaultInstance() + : windowsUpdate_; + } + } + /** + * + * + *
+       * Windows update settings. Use this override the default windows patch rules.
+       * 
+ * + * .google.cloud.osconfig.v1beta.WindowsUpdateSettings windows_update = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder> + getWindowsUpdateFieldBuilder() { + if (windowsUpdateBuilder_ == null) { + windowsUpdateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder>( + getWindowsUpdate(), getParentForChildren(), isClean()); + windowsUpdate_ = null; + } + return windowsUpdateBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep preStep_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder> + preStepBuilder_; + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ExecStep pre_step = 8; + * + * @return The preStep. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getPreStep() { + if (preStepBuilder_ == null) { + return preStep_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance() + : preStep_; + } else { + return preStepBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + */ + public Builder setPreStep(com.google.cloud.osconfig.v1beta.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.v1beta.ExecStep pre_step = 8; + */ + public Builder setPreStep( + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStep pre_step = 8; + */ + public Builder mergePreStep(com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep value) { + if (preStepBuilder_ == null) { + if (preStep_ != null) { + preStep_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ExecStep pre_step = 8; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder getPreStepBuilder() { + + onChanged(); + return getPreStepFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPreStepOrBuilder() { + if (preStepBuilder_ != null) { + return preStepBuilder_.getMessageOrBuilder(); + } else { + return preStep_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance() + : preStep_; + } + } + /** + * + * + *
+       * The `ExecStep` to run before the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep pre_step = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder> + getPreStepFieldBuilder() { + if (preStepBuilder_ == null) { + preStepBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder>( + getPreStep(), getParentForChildren(), isClean()); + preStep_ = null; + } + return preStepBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep postStep_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder> + postStepBuilder_; + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ExecStep post_step = 9; + * + * @return The postStep. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getPostStep() { + if (postStepBuilder_ == null) { + return postStep_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance() + : postStep_; + } else { + return postStepBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + */ + public Builder setPostStep(com.google.cloud.osconfig.v1beta.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.v1beta.ExecStep post_step = 9; + */ + public Builder setPostStep( + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStep post_step = 9; + */ + public Builder mergePostStep(com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep value) { + if (postStepBuilder_ == null) { + if (postStep_ != null) { + postStep_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ExecStep post_step = 9; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder getPostStepBuilder() { + + onChanged(); + return getPostStepFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder getPostStepOrBuilder() { + if (postStepBuilder_ != null) { + return postStepBuilder_.getMessageOrBuilder(); + } else { + return postStep_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance() + : postStep_; + } + } + /** + * + * + *
+       * The `ExecStep` to run after the patch update.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStep post_step = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder> + getPostStepFieldBuilder() { + if (postStepBuilder_ == null) { + postStepBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchConfig) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.PatchConfig(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.Instance) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Namespace for instance state enums.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.Instance} + */ + public static final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.class, + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.Builder.class); + } + + /** + * + * + *
+     * Patch state of an instance.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJobs.Instance)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.Instance other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.Instance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.Instance} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.Instance) + com.google.cloud.osconfig.v1beta.PatchJobs.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.class, + com.google.cloud.osconfig.v1beta.PatchJobs.Instance.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.Instance getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.Instance build() { + com.google.cloud.osconfig.v1beta.PatchJobs.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.Instance buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.Instance result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.Instance) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.Instance other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.Instance) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.Instance(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CancelPatchJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.CancelPatchJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Message for canceling a patch job.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.CancelPatchJobRequest} + */ + public static final class CancelPatchJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest.class, + com.google.cloud.osconfig.v1beta.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]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Name of the patch in the form `projects/*/patchJobs/*`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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.v1beta.PatchJobs.CancelPatchJobRequest)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.CancelPatchJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.CancelPatchJobRequest) + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest.class, + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest build() { + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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]; + * + * @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.v1beta.CancelPatchJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.CancelPatchJobRequest) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.CancelPatchJobRequest(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.CancelPatchJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AptSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.AptSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * By changing the type to DIST, the patching is performed
+     * using `apt-get dist-upgrade` instead.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.AptSettings.Type type = 1; + * + * @return The type. + */ + com.google.cloud.osconfig.v1beta.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.v1beta.AptSettings} + */ + public static final class AptSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_AptSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_AptSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.class, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Builder.class); + } + + /** + * + * + *
+     * Apt patch type.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.AptSettings.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * By changing the type to DIST, the patching is performed
+     * using `apt-get dist-upgrade` instead.
+     * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings.Type type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type result = + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJobs.AptSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.AptSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.AptSettings) + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_AptSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_AptSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.class, + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_AptSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings build() { + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.AptSettings.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.AptSettings.Type type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type result = + com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type.valueOf(type_); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * By changing the type to DIST, the patching is performed
+       * using `apt-get dist-upgrade` instead.
+       * 
+ * + * .google.cloud.osconfig.v1beta.AptSettings.Type type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.AptSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.AptSettings) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.AptSettings(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.AptSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YumSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.YumSettings} + */ + public static final class YumSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_YumSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_YumSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchJobs.YumSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.YumSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.YumSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.YumSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.YumSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.YumSettings) + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_YumSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_YumSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.class, + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_YumSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings build() { + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.YumSettings) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.YumSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.YumSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.YumSettings) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.YumSettings(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.YumSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GooSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.GooSettings) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Googet patching is performed by running `googet update`.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.GooSettings} + */ + public static final class GooSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GooSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GooSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.class, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.GooSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GooSettings) + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GooSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GooSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.class, + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GooSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings build() { + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.GooSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GooSettings) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.GooSettings(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GooSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ZypperSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.ZypperSettings} + */ + public static final class ZypperSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ZypperSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ZypperSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchJobs.ZypperSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ZypperSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ZypperSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ZypperSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ZypperSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ZypperSettings) + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ZypperSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ZypperSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ZypperSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ZypperSettings) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ZypperSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.ZypperSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ZypperSettings) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.ZypperSettings(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ZypperSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WindowsUpdateSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.WindowsUpdateSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the element to return. + * @return The classifications at the given index. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification + getClassifications(int index); + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.WindowsUpdateSettings} + */ + public static final class WindowsUpdateSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.class, + com.google.cloud.osconfig.v1beta.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.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings.Classification> + classifications_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification>() { + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification + convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification + result = + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + .Classification.valueOf(from); + return result == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + .Classification.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the classifications. + */ + @java.lang.Override + public java.util.List< + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification> + getClassificationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification>( + classifications_, classifications_converter_); + } + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return The count of classifications. + */ + @java.lang.Override + public int getClassificationsCount() { + return classifications_.size(); + } + /** + * + * + *
+     * Only apply updates of these windows update classifications. If empty, all
+     * updates are applied.
+     * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param index The index of the element to return. + * @return The classifications at the given index. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the enum numeric values on the wire for classifications. + */ + @java.lang.Override + 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.v1beta.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. + */ + @java.lang.Override + 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.v1beta.PatchJobs.WindowsUpdateSettings)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.WindowsUpdateSettings} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.WindowsUpdateSettings) + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.class, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Builder.class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings build() { + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @return A list containing the classifications. + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification> + getClassificationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings.Classification>( + classifications_, classifications_converter_); + } + /** + * + * + *
+       * Only apply updates of these windows update classifications. If empty, all
+       * updates are applied.
+       * 
+ * + * + * repeated .google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.WindowsUpdateSettings.Classification classifications = 1; + * + * + * @param value The classifications to add. + * @return This builder for chaining. + */ + public Builder addClassifications( + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings + .Classification> + values) { + ensureClassificationsIsMutable(); + for (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.WindowsUpdateSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.WindowsUpdateSettings) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.WindowsUpdateSettings(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.WindowsUpdateSettings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecStepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ExecStep) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig linux_exec_step_config = 1; + * + * @return The linuxExecStepConfig. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getLinuxExecStepConfig(); + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder + getLinuxExecStepConfigOrBuilder(); + + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig windows_exec_step_config = 2; + * + * @return The windowsExecStepConfig. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getWindowsExecStepConfig(); + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder + getWindowsExecStepConfigOrBuilder(); + } + /** + * + * + *
+   * A step that runs an executable for a PatchJob.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ExecStep} + */ + public static final class ExecStep extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig.Builder subBuilder = null; + if (linuxExecStepConfig_ != null) { + subBuilder = linuxExecStepConfig_.toBuilder(); + } + linuxExecStepConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(linuxExecStepConfig_); + linuxExecStepConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder subBuilder = null; + if (windowsExecStepConfig_ != null) { + subBuilder = windowsExecStepConfig_.toBuilder(); + } + windowsExecStepConfig_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder.class); + } + + public static final int LINUX_EXEC_STEP_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig linuxExecStepConfig_; + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + * + * @return Whether the linuxExecStepConfig field is set. + */ + @java.lang.Override + public boolean hasLinuxExecStepConfig() { + return linuxExecStepConfig_ != null; + } + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + * + * @return The linuxExecStepConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getLinuxExecStepConfig() { + return linuxExecStepConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance() + : linuxExecStepConfig_; + } + /** + * + * + *
+     * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder + getLinuxExecStepConfigOrBuilder() { + return getLinuxExecStepConfig(); + } + + public static final int WINDOWS_EXEC_STEP_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig windowsExecStepConfig_; + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + * + * @return Whether the windowsExecStepConfig field is set. + */ + @java.lang.Override + public boolean hasWindowsExecStepConfig() { + return windowsExecStepConfig_ != null; + } + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + * + * @return The windowsExecStepConfig. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getWindowsExecStepConfig() { + return windowsExecStepConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance() + : windowsExecStepConfig_; + } + /** + * + * + *
+     * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+     * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ExecStep} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ExecStep) + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStep_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig linuxExecStepConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder> + linuxExecStepConfigBuilder_; + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig linux_exec_step_config = 1; + * + * @return The linuxExecStepConfig. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getLinuxExecStepConfig() { + if (linuxExecStepConfigBuilder_ == null) { + return linuxExecStepConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance() + : linuxExecStepConfig_; + } else { + return linuxExecStepConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder setLinuxExecStepConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder setLinuxExecStepConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + public Builder mergeLinuxExecStepConfig( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig value) { + if (linuxExecStepConfigBuilder_ == null) { + if (linuxExecStepConfig_ != null) { + linuxExecStepConfig_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder + getLinuxExecStepConfigBuilder() { + + onChanged(); + return getLinuxExecStepConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder + getLinuxExecStepConfigOrBuilder() { + if (linuxExecStepConfigBuilder_ != null) { + return linuxExecStepConfigBuilder_.getMessageOrBuilder(); + } else { + return linuxExecStepConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance() + : linuxExecStepConfig_; + } + } + /** + * + * + *
+       * The ExecStepConfig for all Linux VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig linux_exec_step_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder> + getLinuxExecStepConfigFieldBuilder() { + if (linuxExecStepConfigBuilder_ == null) { + linuxExecStepConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder>( + getLinuxExecStepConfig(), getParentForChildren(), isClean()); + linuxExecStepConfig_ = null; + } + return linuxExecStepConfigBuilder_; + } + + private com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig windowsExecStepConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder> + windowsExecStepConfigBuilder_; + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig windows_exec_step_config = 2; + * + * @return The windowsExecStepConfig. + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getWindowsExecStepConfig() { + if (windowsExecStepConfigBuilder_ == null) { + return windowsExecStepConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance() + : windowsExecStepConfig_; + } else { + return windowsExecStepConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder setWindowsExecStepConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder setWindowsExecStepConfig( + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + public Builder mergeWindowsExecStepConfig( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig value) { + if (windowsExecStepConfigBuilder_ == null) { + if (windowsExecStepConfig_ != null) { + windowsExecStepConfig_ = + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder + getWindowsExecStepConfigBuilder() { + + onChanged(); + return getWindowsExecStepConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder + getWindowsExecStepConfigOrBuilder() { + if (windowsExecStepConfigBuilder_ != null) { + return windowsExecStepConfigBuilder_.getMessageOrBuilder(); + } else { + return windowsExecStepConfig_ == null + ? com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance() + : windowsExecStepConfig_; + } + } + /** + * + * + *
+       * The ExecStepConfig for all Windows VMs targeted by the PatchJob.
+       * 
+ * + * .google.cloud.osconfig.v1beta.ExecStepConfig windows_exec_step_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder> + getWindowsExecStepConfigFieldBuilder() { + if (windowsExecStepConfigBuilder_ == null) { + windowsExecStepConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.ExecStep) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ExecStep) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.ExecStep(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStep getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecStepConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.ExecStepConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An absolute path to the executable on the VM.
+     * 
+ * + * string local_path = 1; + * + * @return Whether the localPath field is set. + */ + boolean hasLocalPath(); + /** + * + * + *
+     * 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.v1beta.GcsObject gcs_object = 2; + * + * @return Whether the gcsObject field is set. + */ + boolean hasGcsObject(); + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + * + * @return The gcsObject. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject getGcsObject(); + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + */ + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The interpreter. + */ + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter getInterpreter(); + + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.ExecutableCase + getExecutableCase(); + } + /** + * + * + *
+   * Common configurations for an ExecStep.
+   * 
+ * + * Protobuf type {@code google.cloud.osconfig.v1beta.ExecStepConfig} + */ + public static final class ExecStepConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject.Builder subBuilder = null; + if (executableCase_ == 2) { + subBuilder = + ((com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject) executable_) + .toBuilder(); + } + executable_ = + input.readMessage( + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder.class); + } + + /** + * + * + *
+     * The interpreter used to execute the a file.
+     * 
+ * + * Protobuf enum {@code google.cloud.osconfig.v1beta.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() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.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.v1beta.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 Whether the localPath field is set. + */ + public boolean hasLocalPath() { + return executableCase_ == 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.v1beta.GcsObject gcs_object = 2; + * + * @return Whether the gcsObject field is set. + */ + @java.lang.Override + public boolean hasGcsObject() { + return executableCase_ == 2; + } + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + * + * @return The gcsObject. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject getGcsObject() { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance(); + } + /** + * + * + *
+     * A Google Cloud Storage object containing the executable.
+     * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObjectOrBuilder getGcsObjectOrBuilder() { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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.v1beta.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The enum numeric value on the wire for interpreter. + */ + @java.lang.Override + 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.v1beta.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The interpreter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter result = + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter.valueOf( + interpreter_); + return result == null + ? com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchJobs.ExecStepConfig)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.ExecStepConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.ExecStepConfig) + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.class, + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig build() { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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 Whether the localPath field is set. + */ + @java.lang.Override + public boolean hasLocalPath() { + return executableCase_ == 1; + } + /** + * + * + *
+       * An absolute path to the executable on the VM.
+       * 
+ * + * string local_path = 1; + * + * @return The localPath. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchJobs.GcsObject, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObjectOrBuilder> + gcsObjectBuilder_; + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + * + * @return Whether the gcsObject field is set. + */ + @java.lang.Override + public boolean hasGcsObject() { + return executableCase_ == 2; + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + * + * @return The gcsObject. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject getGcsObject() { + if (gcsObjectBuilder_ == null) { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance(); + } else { + if (executableCase_ == 2) { + return gcsObjectBuilder_.getMessage(); + } + return com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + */ + public Builder setGcsObject(com.google.cloud.osconfig.v1beta.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.v1beta.GcsObject gcs_object = 2; + */ + public Builder setGcsObject( + com.google.cloud.osconfig.v1beta.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.v1beta.GcsObject gcs_object = 2; + */ + public Builder mergeGcsObject(com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject value) { + if (gcsObjectBuilder_ == null) { + if (executableCase_ == 2 + && executable_ + != com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance()) { + executable_ = + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.newBuilder( + (com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.GcsObject gcs_object = 2; + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.Builder getGcsObjectBuilder() { + return getGcsObjectFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObjectOrBuilder getGcsObjectOrBuilder() { + if ((executableCase_ == 2) && (gcsObjectBuilder_ != null)) { + return gcsObjectBuilder_.getMessageOrBuilder(); + } else { + if (executableCase_ == 2) { + return (com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject) executable_; + } + return com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Google Cloud Storage object containing the executable.
+       * 
+ * + * .google.cloud.osconfig.v1beta.GcsObject gcs_object = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObjectOrBuilder> + getGcsObjectFieldBuilder() { + if (gcsObjectBuilder_ == null) { + if (!(executableCase_ == 2)) { + executable_ = com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance(); + } + gcsObjectBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObjectOrBuilder>( + (com.google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The enum numeric value on the wire for interpreter. + */ + @java.lang.Override + 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.v1beta.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.v1beta.ExecStepConfig.Interpreter interpreter = 4; + * + * @return The interpreter. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter + getInterpreter() { + @SuppressWarnings("deprecation") + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter result = + com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig.Interpreter.valueOf( + interpreter_); + return result == null + ? com.google.cloud.osconfig.v1beta.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.v1beta.ExecStepConfig.Interpreter interpreter = 4; + * + * @param value The interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreter( + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.ExecStepConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.ExecStepConfig) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.ExecStepConfig(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.ExecStepConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GcsObjectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.GcsObject} + */ + public static final class GcsObject extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GcsObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GcsObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.class, + com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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. + */ + @java.lang.Override + 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.v1beta.PatchJobs.GcsObject)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.GcsObject} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.GcsObject) + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GcsObject_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GcsObject_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.class, + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_GcsObject_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject build() { + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject other) { + if (other == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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.v1beta.GcsObject) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.GcsObject) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.GcsObject(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.GcsObject getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PatchInstanceFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter} + */ + public static final class PatchInstanceFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter + .GroupLabel>(); + mutable_bitField0_ |= 0x00000001; + } + groupLabels_.add( + input.readMessage( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder.class); + } + + public interface GroupLabelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel} + */ + public static final class GroupLabel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.class, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_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; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+       * 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.Override + 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; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * 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.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + 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.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + .class); + } + + // Construct using + // com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel) { + return mergeFrom( + (com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+         * 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.Override + 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; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+         * 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.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+         * 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.v1beta.PatchInstanceFilter.GroupLabel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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. + */ + @java.lang.Override + public boolean getAll() { + return all_; + } + + public static final int GROUP_LABELS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel> + 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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + @java.lang.Override + 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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + @java.lang.Override + 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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + @java.lang.Override + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter)) { + return super.equals(obj); + } + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter other = + (com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.osconfig.v1beta.PatchInstanceFilter) + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.osconfig.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.class, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder.class); + } + + // Construct using com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs + .internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter + getDefaultInstanceForType() { + return com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter build() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter buildPartial() { + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter result = + new com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter) { + return mergeFrom((com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter other) { + if (other + == com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.osconfig.v1beta.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. + */ + @java.lang.Override + 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< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel> + groupLabels_ = java.util.Collections.emptyList(); + + private void ensureGroupLabelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groupLabels_ = + new java.util.ArrayList< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel>( + groupLabels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel> + 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.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder setGroupLabels( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder setGroupLabels( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addGroupLabels( + int index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public Builder addAllGroupLabels( + java.lang.Iterable< + ? extends + com.google.cloud.osconfig.v1beta.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.v1beta.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.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + addGroupLabelsBuilder() { + return getGroupLabelsFieldBuilder() + .addBuilder( + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder + addGroupLabelsBuilder(int index) { + return getGroupLabelsFieldBuilder() + .addBuilder( + index, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2; + * + */ + public java.util.List< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder> + getGroupLabelsBuilderList() { + return getGroupLabelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> + getGroupLabelsFieldBuilder() { + if (groupLabelsBuilder_ == null) { + groupLabelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel, + com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel.Builder, + com.google.cloud.osconfig.v1beta.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.v1beta.PatchInstanceFilter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.osconfig.v1beta.PatchInstanceFilter) + private static final com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter(); + } + + public static com.google.cloud.osconfig.v1beta.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.v1beta.PatchJobs.PatchInstanceFilter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchJob_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchConfig_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_Instance_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_Instance_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_AptSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_AptSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_YumSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_YumSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GooSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GooSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ZypperSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ZypperSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ExecStep_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ExecStep_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_GcsObject_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_GcsObject_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_LabelsEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_osconfig_v1beta_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/v1beta/patch_job" + + "s.proto\022\034google.cloud.osconfig.v1beta\032\037g" + + "oogle/api/field_behavior.proto\032\031google/a" + + "pi/resource.proto\032\036google/protobuf/durat" + + "ion.proto\032\037google/protobuf/timestamp.pro" + + "to\"\250\002\n\026ExecutePatchJobRequest\022\023\n\006parent\030" + + "\001 \001(\tB\003\340A\002\022\023\n\013description\030\002 \001(\t\022O\n\017insta" + + "nce_filter\030\007 \001(\01321.google.cloud.osconfig" + + ".v1beta.PatchInstanceFilterB\003\340A\002\022?\n\014patc" + + "h_config\030\004 \001(\0132).google.cloud.osconfig.v" + + "1beta.PatchConfig\022+\n\010duration\030\005 \001(\0132\031.go" + + "ogle.protobuf.Duration\022\017\n\007dry_run\030\006 \001(\010\022" + + "\024\n\014display_name\030\010 \001(\t\"\'\n\022GetPatchJobRequ" + + "est\022\021\n\004name\030\001 \001(\tB\003\340A\002\"p\n\"ListPatchJobIn" + + "stanceDetailsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A" + + "\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + + "\022\016\n\006filter\030\004 \001(\t\"\231\001\n#ListPatchJobInstanc" + + "eDetailsResponse\022Y\n\032patch_job_instance_d" + + "etails\030\001 \003(\01325.google.cloud.osconfig.v1b" + + "eta.PatchJobInstanceDetails\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\264\001\n\027PatchJobInstanceDetails" + + "\022\014\n\004name\030\001 \001(\t\022\032\n\022instance_system_id\030\002 \001" + + "(\t\022@\n\005state\030\003 \001(\01621.google.cloud.osconfi" + + "g.v1beta.Instance.PatchState\022\026\n\016failure_" + + "reason\030\004 \001(\t\022\025\n\rattempt_count\030\005 \001(\003\"b\n\024L" + + "istPatchJobsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002" + + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" + + "\016\n\006filter\030\004 \001(\t\"l\n\025ListPatchJobsResponse" + + "\022:\n\npatch_jobs\030\001 \003(\0132&.google.cloud.osco" + + "nfig.v1beta.PatchJob\022\027\n\017next_page_token\030" + + "\002 \001(\t\"\266\n\n\010PatchJob\022\014\n\004name\030\001 \001(\t\022\024\n\014disp" + + "lay_name\030\016 \001(\t\022\023\n\013description\030\002 \001(\t\022/\n\013c" + + "reate_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tamp\022/\n\013update_time\030\004 \001(\0132\032.google.proto" + + "buf.Timestamp\022;\n\005state\030\005 \001(\0162,.google.cl" + + "oud.osconfig.v1beta.PatchJob.State\022J\n\017in" + + "stance_filter\030\r \001(\01321.google.cloud.oscon" + + "fig.v1beta.PatchInstanceFilter\022?\n\014patch_" + + "config\030\007 \001(\0132).google.cloud.osconfig.v1b" + + "eta.PatchConfig\022+\n\010duration\030\010 \001(\0132\031.goog" + + "le.protobuf.Duration\022_\n\030instance_details" + + "_summary\030\t \001(\0132=.google.cloud.osconfig.v" + + "1beta.PatchJob.InstanceDetailsSummary\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\022\035\n\020patch_deploym" + + "ent\030\017 \001(\tB\003\340A\003\032\275\004\n\026InstanceDetailsSummar" + + "y\022\036\n\026pending_instance_count\030\001 \001(\003\022\037\n\027ina" + + "ctive_instance_count\030\002 \001(\003\022\037\n\027notified_i" + + "nstance_count\030\003 \001(\003\022\036\n\026started_instance_" + + "count\030\004 \001(\003\022*\n\"downloading_patches_insta" + + "nce_count\030\005 \001(\003\022\'\n\037applying_patches_inst" + + "ance_count\030\006 \001(\003\022 \n\030rebooting_instance_c" + + "ount\030\007 \001(\003\022 \n\030succeeded_instance_count\030\010" + + " \001(\003\0220\n(succeeded_reboot_required_instan" + + "ce_count\030\t \001(\003\022\035\n\025failed_instance_count\030" + + "\n \001(\003\022\034\n\024acked_instance_count\030\013 \001(\003\022 \n\030t" + + "imed_out_instance_count\030\014 \001(\003\022%\n\035pre_pat" + + "ch_step_instance_count\030\r \001(\003\022&\n\036post_pat" + + "ch_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\007STARTED\020\001\022\023\n\017" + + "INSTANCE_LOOKUP\020\002\022\014\n\010PATCHING\020\003\022\r\n\tSUCCE" + + "EDED\020\004\022\031\n\025COMPLETED_WITH_ERRORS\020\005\022\014\n\010CAN" + + "CELED\020\006\022\r\n\tTIMED_OUT\020\007\"\327\004\n\013PatchConfig\022M" + + "\n\rreboot_config\030\001 \001(\01626.google.cloud.osc" + + "onfig.v1beta.PatchConfig.RebootConfig\0226\n" + + "\003apt\030\003 \001(\0132).google.cloud.osconfig.v1bet" + + "a.AptSettings\0226\n\003yum\030\004 \001(\0132).google.clou" + + "d.osconfig.v1beta.YumSettings\0226\n\003goo\030\005 \001" + + "(\0132).google.cloud.osconfig.v1beta.GooSet" + + "tings\022<\n\006zypper\030\006 \001(\0132,.google.cloud.osc" + + "onfig.v1beta.ZypperSettings\022K\n\016windows_u" + + "pdate\030\007 \001(\01323.google.cloud.osconfig.v1be" + + "ta.WindowsUpdateSettings\0228\n\010pre_step\030\010 \001" + + "(\0132&.google.cloud.osconfig.v1beta.ExecSt" + + "ep\0229\n\tpost_step\030\t \001(\0132&.google.cloud.osc" + + "onfig.v1beta.ExecStep\"Q\n\014RebootConfig\022\035\n" + + "\031REBOOT_CONFIG_UNSPECIFIED\020\000\022\013\n\007DEFAULT\020" + + "\001\022\n\n\006ALWAYS\020\002\022\t\n\005NEVER\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\010INACTIVE\020\002\022\014\n\010NOTIFIED" + + "\020\003\022\013\n\007STARTED\020\004\022\027\n\023DOWNLOADING_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\031SUCCEEDED_REBOOT_REQUIRE" + + "D\020\t\022\n\n\006FAILED\020\n\022\t\n\005ACKED\020\013\022\r\n\tTIMED_OUT\020" + + "\014\022\032\n\026RUNNING_PRE_PATCH_STEP\020\r\022\033\n\027RUNNING" + + "_POST_PATCH_STEP\020\016\022\025\n\021NO_AGENT_DETECTED\020" + + "\017\"*\n\025CancelPatchJobRequest\022\021\n\004name\030\001 \001(\t" + + "B\003\340A\002\"\256\001\n\013AptSettings\022<\n\004type\030\001 \001(\0162..go" + + "ogle.cloud.osconfig.v1beta.AptSettings.T" + + "ype\022\020\n\010excludes\030\002 \003(\t\022\032\n\022exclusive_packa" + + "ges\030\003 \003(\t\"3\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022" + + "\010\n\004DIST\020\001\022\013\n\007UPGRADE\020\002\"^\n\013YumSettings\022\020\n" + + "\010security\030\001 \001(\010\022\017\n\007minimal\030\002 \001(\010\022\020\n\010excl" + + "udes\030\003 \003(\t\022\032\n\022exclusive_packages\030\004 \003(\t\"\r" + + "\n\013GooSettings\"\221\001\n\016ZypperSettings\022\025\n\rwith" + + "_optional\030\001 \001(\010\022\023\n\013with_update\030\002 \001(\010\022\022\n\n" + + "categories\030\003 \003(\t\022\022\n\nseverities\030\004 \003(\t\022\020\n\010" + + "excludes\030\005 \003(\t\022\031\n\021exclusive_patches\030\006 \003(" + + "\t\"\331\002\n\025WindowsUpdateSettings\022[\n\017classific" + + "ations\030\001 \003(\0162B.google.cloud.osconfig.v1b" + + "eta.WindowsUpdateSettings.Classification" + + "\022\020\n\010excludes\030\002 \003(\t\022\031\n\021exclusive_patches\030" + + "\003 \003(\t\"\265\001\n\016Classification\022\036\n\032CLASSIFICATI" + + "ON_UNSPECIFIED\020\000\022\014\n\010CRITICAL\020\001\022\014\n\010SECURI" + + "TY\020\002\022\016\n\nDEFINITION\020\003\022\n\n\006DRIVER\020\004\022\020\n\014FEAT" + + "URE_PACK\020\005\022\020\n\014SERVICE_PACK\020\006\022\010\n\004TOOL\020\007\022\021" + + "\n\rUPDATE_ROLLUP\020\010\022\n\n\006UPDATE\020\t\"\250\001\n\010ExecSt" + + "ep\022L\n\026linux_exec_step_config\030\001 \001(\0132,.goo" + + "gle.cloud.osconfig.v1beta.ExecStepConfig" + + "\022N\n\030windows_exec_step_config\030\002 \001(\0132,.goo" + + "gle.cloud.osconfig.v1beta.ExecStepConfig" + + "\"\250\002\n\016ExecStepConfig\022\024\n\nlocal_path\030\001 \001(\tH" + + "\000\022=\n\ngcs_object\030\002 \001(\0132\'.google.cloud.osc" + + "onfig.v1beta.GcsObjectH\000\022\035\n\025allowed_succ" + + "ess_codes\030\003 \003(\005\022M\n\013interpreter\030\004 \001(\01628.g" + + "oogle.cloud.osconfig.v1beta.ExecStepConf" + + "ig.Interpreter\"E\n\013Interpreter\022\033\n\027INTERPR" + + "ETER_UNSPECIFIED\020\000\022\t\n\005SHELL\020\001\022\016\n\nPOWERSH" + + "ELL\020\002B\014\n\nexecutable\"U\n\tGcsObject\022\023\n\006buck" + + "et\030\001 \001(\tB\003\340A\002\022\023\n\006object\030\002 \001(\tB\003\340A\002\022\036\n\021ge" + + "neration_number\030\003 \001(\003B\003\340A\002\"\320\002\n\023PatchInst" + + "anceFilter\022\013\n\003all\030\001 \001(\010\022R\n\014group_labels\030" + + "\002 \003(\0132<.google.cloud.osconfig.v1beta.Pat" + + "chInstanceFilter.GroupLabel\022\r\n\005zones\030\003 \003" + + "(\t\022\021\n\tinstances\030\004 \003(\t\022\036\n\026instance_name_p" + + "refixes\030\005 \003(\t\032\225\001\n\nGroupLabel\022X\n\006labels\030\001" + + " \003(\0132H.google.cloud.osconfig.v1beta.Patc" + + "hInstanceFilter.GroupLabel.LabelsEntry\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001Bs\n com.google.cloud.osconfig.v1bet" + + "aB\tPatchJobsZDgoogle.golang.org/genproto" + + "/googleapis/cloud/osconfig/v1beta;osconf" + + "igb\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_v1beta_ExecutePatchJobRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ExecutePatchJobRequest_descriptor, + new java.lang.String[] { + "Parent", + "Description", + "InstanceFilter", + "PatchConfig", + "Duration", + "DryRun", + "DisplayName", + }); + internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GetPatchJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListPatchJobInstanceDetailsResponse_descriptor, + new java.lang.String[] { + "PatchJobInstanceDetails", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchJobInstanceDetails_descriptor, + new java.lang.String[] { + "Name", "InstanceSystemId", "State", "FailureReason", "AttemptCount", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ListPatchJobsResponse_descriptor, + new java.lang.String[] { + "PatchJobs", "NextPageToken", + }); + internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_osconfig_v1beta_PatchJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_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_v1beta_PatchJob_InstanceDetailsSummary_descriptor = + internal_static_google_cloud_osconfig_v1beta_PatchJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_osconfig_v1beta_PatchJob_InstanceDetailsSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_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_v1beta_PatchConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_osconfig_v1beta_PatchConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchConfig_descriptor, + new java.lang.String[] { + "RebootConfig", "Apt", "Yum", "Goo", "Zypper", "WindowsUpdate", "PreStep", "PostStep", + }); + internal_static_google_cloud_osconfig_v1beta_Instance_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_osconfig_v1beta_Instance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_Instance_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_CancelPatchJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_osconfig_v1beta_AptSettings_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_osconfig_v1beta_AptSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_AptSettings_descriptor, + new java.lang.String[] { + "Type", "Excludes", "ExclusivePackages", + }); + internal_static_google_cloud_osconfig_v1beta_YumSettings_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_osconfig_v1beta_YumSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_YumSettings_descriptor, + new java.lang.String[] { + "Security", "Minimal", "Excludes", "ExclusivePackages", + }); + internal_static_google_cloud_osconfig_v1beta_GooSettings_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_osconfig_v1beta_GooSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GooSettings_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_osconfig_v1beta_ZypperSettings_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_osconfig_v1beta_ZypperSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ZypperSettings_descriptor, + new java.lang.String[] { + "WithOptional", + "WithUpdate", + "Categories", + "Severities", + "Excludes", + "ExclusivePatches", + }); + internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_WindowsUpdateSettings_descriptor, + new java.lang.String[] { + "Classifications", "Excludes", "ExclusivePatches", + }); + internal_static_google_cloud_osconfig_v1beta_ExecStep_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_osconfig_v1beta_ExecStep_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ExecStep_descriptor, + new java.lang.String[] { + "LinuxExecStepConfig", "WindowsExecStepConfig", + }); + internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_ExecStepConfig_descriptor, + new java.lang.String[] { + "LocalPath", "GcsObject", "AllowedSuccessCodes", "Interpreter", "Executable", + }); + internal_static_google_cloud_osconfig_v1beta_GcsObject_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_osconfig_v1beta_GcsObject_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_GcsObject_descriptor, + new java.lang.String[] { + "Bucket", "Object", "GenerationNumber", + }); + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor, + new java.lang.String[] { + "All", "GroupLabels", "Zones", "Instances", "InstanceNamePrefixes", + }); + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_descriptor = + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_descriptor, + new java.lang.String[] { + "Labels", + }); + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_LabelsEntry_descriptor = + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_osconfig_v1beta_PatchInstanceFilter_GroupLabel_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_osconfig_v1beta_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); + 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-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/ProjectName.java b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/ProjectName.java new file mode 100644 index 00000000..b75d84ea --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/java/com/google/cloud/osconfig/v1beta/ProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.osconfig.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto new file mode 100644 index 00000000..f7fd0747 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/guest_policies.proto @@ -0,0 +1,773 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "GuestPolicies"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// An OS Config resource representing a guest configuration policy. These +// policies represent the desired state for VM instance guest environments +// including packages to install or remove, package repository configurations, +// and software to install. +message GuestPolicy { + option (google.api.resource) = { + type: "osconfig.googleapis.com/GuestPolicy" + pattern: "projects/{project}/guestPolicies/{guest_policy}" + }; + + // Required. Unique name of the resource in this project using one of the following + // forms: + // `projects/{project_number}/guestPolicies/{guest_policy_id}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Description of the guest policy. Length of the description is limited + // to 1024 characters. + string description = 2; + + // Output only. Time this guest policy was created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time this guest policy was updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Specifies the VM instances that are assigned to this policy. This allows + // you to target sets or groups of VM instances by different parameters such + // as labels, names, OS, or zones. + // + // If left empty, all VM instances underneath this policy are targeted. + // + // At the same level in the resource hierarchy (that is within a project), the + // service prevents the creation of multiple policies that conflict with + // each other. For more information, see how the service [handles assignment + // conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts). + Assignment assignment = 6 [(google.api.field_behavior) = REQUIRED]; + + // The software packages to be managed by this policy. + repeated Package packages = 7; + + // A list of package repositories to configure on the VM instance. This is + // done before any other configs are applied so they can use these repos. + // Package repositories are only configured if the corresponding package + // manager(s) are available. + repeated PackageRepository package_repositories = 8; + + // A list of Recipes to install on the VM instance. + repeated SoftwareRecipe recipes = 9; + + // The etag for this guest policy. + // If this is provided on update, it must match the server's etag. + string etag = 10; +} + +// An assignment represents the group or groups of VM instances that the policy +// applies to. +// +// If an assignment is empty, it applies to all VM instances. Otherwise, the +// targeted VM instances must meet all the criteria specified. So if both +// labels and zones are specified, the policy applies to VM instances with those +// labels and in those zones. +message Assignment { + // Represents a group of VM intances 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 an + // instance to be included in this assignment group. + map labels = 1; + } + + // Defines the criteria for selecting VM Instances by OS type. + message OsType { + // Targets VM instances with OS Inventory enabled and having the following + // OS short name, for example "debian" or "windows". + string os_short_name = 1; + + // Targets VM instances with OS Inventory enabled and having the following + // following OS version. + string os_version = 2; + + // Targets VM instances with OS Inventory enabled and having the following + // OS architecture. + string os_architecture = 3; + } + + // Targets instances matching at least one of these label sets. This allows + // an assignment to target disparate groups, for example "env=prod or + // env=staging". + repeated GroupLabel group_labels = 1; + + // Targets instances in any of these zones. Leave empty to target instances + // in any zone. + // + // Zonal targeting is uncommon and is supported to facilitate the management + // of changes by zone. + repeated string zones = 2; + + // Targets any of the instances specified. Instances are specified by their + // URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`. + // + // Instance targeting is uncommon and is supported to facilitate the + // management of changes by the instance or to target specific VM instances + // for development and testing. + // + // Only supported for project-level policies and must reference instances + // within this project. + repeated string instances = 3; + + // Targets VM instances whose name starts with one of these prefixes. + // + // Like labels, this is another way to group VM instances when targeting + // configs, for example prefix="prod-". + // + // Only supported for project-level policies. + repeated string instance_name_prefixes = 4; + + // Targets VM instances matching at least one of the following OS types. + // + // VM instances must match all supplied criteria for a given OsType to be + // included. + repeated OsType os_types = 5; +} + +// Package is a reference to the software package to be installed or removed. +// The agent on the VM instance uses the system package manager to apply the +// config. +// +// +// These are the commands that the agent uses to install or remove +// packages. +// +// Apt +// install: `apt-get update && apt-get -y install package1 package2 package3` +// remove: `apt-get -y remove package1 package2 package3` +// +// Yum +// install: `yum -y install package1 package2 package3` +// remove: `yum -y remove package1 package2 package3` +// +// Zypper +// install: `zypper install package1 package2 package3` +// remove: `zypper rm package1 package2` +// +// Googet +// install: `googet -noconfirm install package1 package2 package3` +// remove: `googet -noconfirm remove package1 package2 package3` +message Package { + // Types of package managers that may be used to manage this package. + enum Manager { + // The default behavior is ANY. + MANAGER_UNSPECIFIED = 0; + + // Apply this package config using the default system package manager. + ANY = 1; + + // Apply this package config only if Apt is available on the system. + APT = 2; + + // Apply this package config only if Yum is available on the system. + YUM = 3; + + // Apply this package config only if Zypper is available on the system. + ZYPPER = 4; + + // Apply this package config only if GooGet is available on the system. + GOO = 5; + } + + // Required. The name of the package. A package is uniquely identified for conflict + // validation by checking the package name and the manager(s) that the + // package targets. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The desired_state the agent should maintain for this package. The + // default is to ensure the package is installed. + DesiredState desired_state = 2; + + // Type of package manager that can be used to install this package. + // If a system does not have the package manager, the package is not + // installed or removed no error message is returned. By default, + // or if you specify `ANY`, + // the agent attempts to install and remove this package using the default + // package manager. This is useful when creating a policy that applies to + // different types of systems. + // + // The default behavior is ANY. + Manager manager = 3; +} + +// Represents a single Apt package repository. This repository is added to +// a repo file that is stored at +// `/etc/apt/sources.list.d/google_osconfig.list`. +message AptRepository { + // Type of archive. + enum ArchiveType { + // Unspecified. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // DEB indicates that the archive contains binary files. + DEB = 1; + + // DEB_SRC indicates that the archive contains source files. + DEB_SRC = 2; + } + + // Type of archive files in this repository. The default behavior is DEB. + ArchiveType archive_type = 1; + + // Required. URI for this repository. + string uri = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distribution of this repository. + string distribution = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of components for this repository. Must contain at least one item. + repeated string components = 4 [(google.api.field_behavior) = REQUIRED]; + + // URI of the key file for this repository. The agent maintains + // a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing + // all the keys in any applied guest policy. + string gpg_key = 5; +} + +// Represents a single Yum package repository. This repository is added to a +// repo file that is stored at `/etc/yum.repos.d/google_osconfig.repo`. +message YumRepository { + // Required. A one word, unique name for this repository. This is + // the `repo id` in the Yum config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique identifier + // when checking for guest policy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; +} + +// Represents a single Zypper package repository. This repository is added to a +// repo file that is stored at `/etc/zypp/repos.d/google_osconfig.repo`. +message ZypperRepository { + // Required. A one word, unique name for this repository. This is + // the `repo id` in the zypper config file and also the `display_name` if + // `display_name` is omitted. This id is also used as the unique identifier + // when checking for guest policy conflicts. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The display name of the repository. + string display_name = 2; + + // Required. The location of the repository directory. + string base_url = 3 [(google.api.field_behavior) = REQUIRED]; + + // URIs of GPG keys. + repeated string gpg_keys = 4; +} + +// Represents a Goo package repository. These is added to a repo file +// that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo. +message GooRepository { + // Required. The name of the repository. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The url of the repository. + string url = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The desired state that the OS Config agent maintains on the VM instance. +enum DesiredState { + // The default is to ensure the package is installed. + DESIRED_STATE_UNSPECIFIED = 0; + + // The agent ensures that the package is installed. + INSTALLED = 1; + + // The agent ensures that the package is installed and + // periodically checks for and install any updates. + UPDATED = 2; + + // The agent ensures that the package is not installed and uninstall it + // if detected. + REMOVED = 3; +} + +// A package repository. +message PackageRepository { + // A specific type of repository. + oneof repository { + // An Apt Repository. + AptRepository apt = 1; + + // A Yum Repository. + YumRepository yum = 2; + + // A Zypper Repository. + ZypperRepository zypper = 3; + + // A Goo Repository. + GooRepository goo = 4; + } +} + +// A software recipe is a set of instructions for installing and configuring a +// piece of software. It consists of a set of artifacts that are +// downloaded, and a set of steps that install, configure, and/or update the +// software. +// +// Recipes support installing and updating software from artifacts in the +// following formats: +// Zip archive, Tar archive, Windows MSI, Debian package, and RPM package. +// +// Additionally, recipes support executing a script (either defined in a file or +// directly in this api) in bash, sh, cmd, and powershell. +// +// Updating a software recipe +// +// If a recipe is assigned to an instance and there is a recipe with the same +// name but a lower version already installed and the assigned state +// of the recipe is `INSTALLED_KEEP_UPDATED`, then the recipe is updated to +// the new version. +// +// Script Working Directories +// +// Each script or execution step is run in its own temporary directory which +// is deleted after completing the step. +message SoftwareRecipe { + // Specifies a resource to be used in the recipe. + message Artifact { + // Specifies an artifact available via some URI. + message Remote { + // URI from which to fetch the object. It should contain both the protocol + // and path following the format {protocol}://{location}. + string uri = 1; + + // Must be provided if `allow_insecure` is `false`. + // SHA256 checksum in hex format, to compare to the checksum of the + // artifact. If the checksum is not empty and it doesn't match the + // artifact then the recipe installation fails before running any of the + // steps. + string checksum = 2; + } + + // Specifies an artifact available as a Google Cloud Storage object. + message Gcs { + // Bucket of the Google Cloud Storage object. + // Given an example URL: + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `my-bucket`. + string bucket = 1; + + // Name of the Google Cloud Storage object. + // As specified [here] + // (https://cloud.google.com/storage/docs/naming#objectnames) + // Given an example URL: + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `foo/bar`. + string object = 2; + + // Must be provided if allow_insecure is false. + // Generation number of the Google Cloud Storage object. + // `https://storage.googleapis.com/my-bucket/foo/bar#1234567` + // this value would be `1234567`. + int64 generation = 3; + } + + // Required. Id of the artifact, which the installation and update steps of this + // recipe can reference. Artifacts in a recipe cannot have the same id. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // A specific type of artifact. + oneof artifact { + // A generic remote artifact. + Remote remote = 2; + + // A Google Cloud Storage artifact. + Gcs gcs = 3; + } + + // Defaults to false. When false, recipes are subject to validations + // based on the artifact type: + // + // Remote: A checksum must be specified, and only protocols with + // transport-layer security are permitted. + // GCS: An object generation number must be specified. + bool allow_insecure = 4; + } + + // An action that can be taken as part of installing or updating a recipe. + message Step { + // Copies the artifact to the specified path on the instance. + message CopyFile { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The absolute path on the instance to put the file. + string destination = 2 [(google.api.field_behavior) = REQUIRED]; + + // Whether to allow this step to overwrite existing files. If this is + // false and the file already exists the file is not overwritten + // and the step is considered a success. Defaults to false. + bool overwrite = 3; + + // Consists of three octal digits which represent, in + // order, the permissions of the owner, group, and other users for the + // file (similarly to the numeric mode used in the linux chmod utility). + // Each digit represents a three bit number with the 4 bit + // corresponding to the read permissions, the 2 bit corresponds to the + // write bit, and the one bit corresponds to the execute permission. + // Default behavior is 755. + // + // Below are some examples of permissions and their associated values: + // read, write, and execute: 7 + // read and execute: 5 + // read and write: 6 + // read only: 4 + string permissions = 4; + } + + // Extracts an archive of the type specified in the specified directory. + message ExtractArchive { + // Specifying the type of archive. + enum ArchiveType { + // Indicates that the archive type isn't specified. + ARCHIVE_TYPE_UNSPECIFIED = 0; + + // Indicates that the archive is a tar archive with no encryption. + TAR = 1; + + // Indicates that the archive is a tar archive with gzip encryption. + TAR_GZIP = 2; + + // Indicates that the archive is a tar archive with bzip encryption. + TAR_BZIP = 3; + + // Indicates that the archive is a tar archive with lzma encryption. + TAR_LZMA = 4; + + // Indicates that the archive is a tar archive with xz encryption. + TAR_XZ = 5; + + // Indicates that the archive is a zip archive. + ZIP = 11; + } + + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Directory to extract archive to. + // Defaults to `/` on Linux or `C:\` on Windows. + string destination = 2; + + // Required. The type of the archive to extract. + ArchiveType type = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Installs an MSI file. + message InstallMsi { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The flags to use when installing the MSI + // defaults to ["/i"] (i.e. the install flag). + repeated string flags = 2; + + // Return codes that indicate that the software installed or updated + // successfully. Behaviour defaults to [0] + repeated int32 allowed_exit_codes = 3; + } + + // Installs a deb via dpkg. + message InstallDpkg { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Installs an rpm file via the rpm utility. + message InstallRpm { + // Required. The id of the relevant artifact in the recipe. + string artifact_id = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Executes an artifact or local file. + message ExecFile { + // Location of the file to execute. + oneof location_type { + // The id of the relevant artifact in the recipe. + string artifact_id = 1; + + // The absolute path of the file on the local filesystem. + string local_path = 2; + } + + // Arguments to be passed to the provided executable. + repeated string args = 3; + + // Defaults to [0]. A list of possible return values that the program + // can return to indicate a success. + repeated int32 allowed_exit_codes = 4; + } + + // Runs a script through an interpreter. + message RunScript { + // The interpreter used to execute a script. + enum Interpreter { + // Default value for ScriptType. + INTERPRETER_UNSPECIFIED = 0; + + // Indicates that the script is run with `/bin/sh` on Linux and `cmd` + // on windows. + SHELL = 1; + + // Indicates that the script is run with powershell. + POWERSHELL = 3; + } + + // Required. The shell script to be executed. + string script = 1 [(google.api.field_behavior) = REQUIRED]; + + // Return codes that indicate that the software installed or updated + // successfully. Behaviour defaults to [0] + repeated int32 allowed_exit_codes = 2; + + // The script interpreter to use to run the script. If no interpreter is + // specified the script is executed directly, which likely + // only succeed for scripts with + // [shebang lines](https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + Interpreter interpreter = 3; + } + + // A specific type of step. + oneof step { + // Copies a file onto the instance. + CopyFile file_copy = 1; + + // Extracts an archive into the specified directory. + ExtractArchive archive_extraction = 2; + + // Installs an MSI file. + InstallMsi msi_installation = 3; + + // Installs a deb file via dpkg. + InstallDpkg dpkg_installation = 4; + + // Installs an rpm file via the rpm utility. + InstallRpm rpm_installation = 5; + + // Executes an artifact or local file. + ExecFile file_exec = 6; + + // Runs commands in a shell. + RunScript script_run = 7; + } + } + + // Required. Unique identifier for the recipe. Only one recipe with a given name is + // installed on an instance. + // + // Names are also used to identify resources which helps to determine whether + // guest policies have conflicts. This means that requests to create multiple + // recipes with the same name and version are rejected since they + // could potentially have conflicting assignments. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The version of this software recipe. Version can be up to 4 period + // separated numbers (e.g. 12.34.56.78). + string version = 2; + + // Resources available to be used in the steps in the recipe. + repeated Artifact artifacts = 3; + + // Actions to be taken for installing this recipe. On failure it stops + // executing steps and does not attempt another installation. Any steps taken + // (including partially completed steps) are not rolled back. + repeated Step install_steps = 4; + + // Actions to be taken for updating this recipe. On failure it stops + // executing steps and does not attempt another update for this recipe. Any + // steps taken (including partially completed steps) are not rolled back. + repeated Step update_steps = 5; + + // Default is INSTALLED. The desired state the agent should maintain for this + // recipe. + // + // INSTALLED: The software recipe is installed on the instance but + // won't be updated to new versions. + // INSTALLED_KEEP_UPDATED: The software recipe is installed on the + // instance. The recipe is updated to a higher + // version, if a higher version of the recipe is + // assigned to this instance. + // REMOVE: Remove is unsupported for software recipes and attempts to + // create or update a recipe to the REMOVE state is rejected. + DesiredState desired_state = 6; +} + +// A request message for creating a guest policy. +message CreateGuestPolicyRequest { + // Required. The resource name of the parent using one of the following forms: + // `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "osconfig.googleapis.com/GuestPolicy" + } + ]; + + // Required. The logical name of the guest policy in the project + // with the following restrictions: + // + // * 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 guest_policy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The GuestPolicy to create. + GuestPolicy guest_policy = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A request message for retrieving a guest policy. +message GetGuestPolicyRequest { + // Required. The resource name of the guest policy using one of the following forms: + // `projects/{project_number}/guestPolicies/{guest_policy_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/GuestPolicy" + } + ]; +} + +// A request message for listing guest policies. +message ListGuestPoliciesRequest { + // Required. The resource name of the parent using one of the following forms: + // `projects/{project_number}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "osconfig.googleapis.com/GuestPolicy" + } + ]; + + // The maximum number of guest policies to return. + int32 page_size = 2; + + // A pagination token returned from a previous call to `ListGuestPolicies` + // that indicates where this listing should continue from. + string page_token = 3; +} + +// A response message for listing guest policies. +message ListGuestPoliciesResponse { + // The list of GuestPolicies. + repeated GuestPolicy guest_policies = 1; + + // A pagination token that can be used to get the next page + // of guest policies. + string next_page_token = 2; +} + +// A request message for updating a guest policy. +message UpdateGuestPolicyRequest { + // Required. The updated GuestPolicy. + GuestPolicy guest_policy = 1 [(google.api.field_behavior) = REQUIRED]; + + // Field mask that controls which fields of the guest policy should be + // updated. + google.protobuf.FieldMask update_mask = 2; +} + +// A request message for deleting a guest policy. +message DeleteGuestPolicyRequest { + // Required. The resource name of the guest policy using one of the following forms: + // `projects/{project_number}/guestPolicies/{guest_policy_id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "osconfig.googleapis.com/GuestPolicy" + } + ]; +} + +// A request message for getting the effective guest policy assigned to the +// instance. +message LookupEffectiveGuestPolicyRequest { + // Required. The VM instance whose policies are being looked up. + string instance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Short name of the OS running on the instance. The OS Config agent only + // provides this field for targeting if OS Inventory is enabled for that + // instance. + string os_short_name = 2; + + // Version of the OS running on the instance. The OS Config agent only + // provides this field for targeting if OS Inventory is enabled for that + // VM instance. + string os_version = 3; + + // Architecture of OS running on the instance. The OS Config agent only + // provides this field for targeting if OS Inventory is enabled for that + // instance. + string os_architecture = 4; +} + +// The effective guest policy that applies to a VM instance. +message EffectiveGuestPolicy { + // A guest policy package including its source. + message SourcedPackage { + // Name of the guest policy providing this config. + string source = 1; + + // A software package to configure on the VM instance. + Package package = 2; + } + + // A guest policy package repository including its source. + message SourcedPackageRepository { + // Name of the guest policy providing this config. + string source = 1; + + // A software package repository to configure on the VM instance. + PackageRepository package_repository = 2; + } + + // A guest policy recipe including its source. + message SourcedSoftwareRecipe { + // Name of the guest policy providing this config. + string source = 1; + + // A software recipe to configure on the VM instance. + SoftwareRecipe software_recipe = 2; + } + + // List of package configurations assigned to the VM instance. + repeated SourcedPackage packages = 1; + + // List of package repository configurations assigned to the VM instance. + repeated SourcedPackageRepository package_repositories = 2; + + // List of recipes assigned to the VM instance. + repeated SourcedSoftwareRecipe software_recipes = 3; +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto new file mode 100644 index 00000000..2211d835 --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/osconfig_service.proto @@ -0,0 +1,157 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/osconfig/v1beta/guest_policies.proto"; +import "google/cloud/osconfig/v1beta/patch_deployments.proto"; +import "google/cloud/osconfig/v1beta/patch_jobs.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "OsConfigProto"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// 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: "/v1beta/{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: "/v1beta/{name=projects/*/patchJobs/*}" + }; + } + + // 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: "/v1beta/{name=projects/*/patchJobs/*}:cancel" + body: "*" + }; + } + + // Get a list of patch jobs. + rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/patchJobs" + }; + } + + // Get a list of instance details for a given patch job. + rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { + option (google.api.http) = { + get: "/v1beta/{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: "/v1beta/{parent=projects/*}/patchDeployments" + body: "patch_deployment" + }; + } + + // Get an OS Config patch deployment. + rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/patchDeployments/*}" + }; + } + + // Get a page of OS Config patch deployments. + rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/patchDeployments" + }; + } + + // Delete an OS Config patch deployment. + rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/patchDeployments/*}" + }; + } + + // Create an OS Config guest policy. + rpc CreateGuestPolicy(CreateGuestPolicyRequest) returns (GuestPolicy) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*}/guestPolicies" + body: "guest_policy" + }; + option (google.api.method_signature) = "parent, guest_policy"; + } + + // Get an OS Config guest policy. + rpc GetGuestPolicy(GetGuestPolicyRequest) returns (GuestPolicy) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/guestPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get a page of OS Config guest policies. + rpc ListGuestPolicies(ListGuestPoliciesRequest) returns (ListGuestPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*}/guestPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an OS Config guest policy. + rpc UpdateGuestPolicy(UpdateGuestPolicyRequest) returns (GuestPolicy) { + option (google.api.http) = { + patch: "/v1beta/{guest_policy.name=projects/*/guestPolicies/*}" + body: "guest_policy" + }; + option (google.api.method_signature) = "guest_policy,update_mask"; + } + + // Delete an OS Config guest policy. + rpc DeleteGuestPolicy(DeleteGuestPolicyRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/guestPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup the effective guest policy that applies to a VM instance. This + // lookup merges all policies that are assigned to the instance ancestry. + rpc LookupEffectiveGuestPolicy(LookupEffectiveGuestPolicyRequest) returns (EffectiveGuestPolicy) { + option (google.api.http) = { + post: "/v1beta/{instance=projects/*/zones/*/instances/*}:lookupEffectiveGuestPolicy" + body: "*" + }; + } +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto new file mode 100644 index 00000000..a98f4b3f --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_deployments.proto @@ -0,0 +1,227 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/osconfig/v1beta/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 go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "PatchDeployments"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// 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 { + // 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]; + + // 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]; +} + +// 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]; + + // 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]; +} diff --git a/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto new file mode 100644 index 00000000..780e18be --- /dev/null +++ b/proto-google-cloud-os-config-v1beta/src/main/proto/google/cloud/osconfig/v1beta/patch_jobs.proto @@ -0,0 +1,638 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; +option java_outer_classname = "PatchJobs"; +option java_package = "com.google.cloud.osconfig.v1beta"; + +// 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]; + + // 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]; +} + +// 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]; + + // 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; + + // 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]; + + // 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 { + // 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]; +} + +// 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]; +} + +// 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; +} From 9489406ef9ca8e3a156577ef86bb59de9887f59e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 27 May 2021 20:22:51 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- versions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/versions.txt b/versions.txt index 4249bc84..dc0b0ad3 100644 --- a/versions.txt +++ b/versions.txt @@ -8,4 +8,3 @@ grpc-google-cloud-os-config-v1alpha:1.2.3:1.2.4-SNAPSHOT proto-google-cloud-os-config-v1:1.2.3:1.2.4-SNAPSHOT proto-google-cloud-os-config-v1alpha:1.2.3:1.2.4-SNAPSHOT proto-google-cloud-os-config-v1beta:1.2.3:1.2.4-SNAPSHOT - From 231dcaa669ea7f798dc1ed58d34fe2bda1e52ac1 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 27 May 2021 16:27:23 -0400 Subject: [PATCH 4/5] chore: update pom files --- grpc-google-cloud-os-config-v1alpha/pom.xml | 4 ++-- grpc-google-cloud-os-config-v1beta/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-os-config-v1alpha/pom.xml | 4 ++-- proto-google-cloud-os-config-v1beta/pom.xml | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/grpc-google-cloud-os-config-v1alpha/pom.xml b/grpc-google-cloud-os-config-v1alpha/pom.xml index 85e230b5..f6384b94 100644 --- a/grpc-google-cloud-os-config-v1alpha/pom.xml +++ b/grpc-google-cloud-os-config-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-os-config-v1alpha - 1.2.2 + 1.2.4-SNAPSHOT grpc-google-cloud-os-config-v1alpha GRPC library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 1.2.2 + 1.2.4-SNAPSHOT diff --git a/grpc-google-cloud-os-config-v1beta/pom.xml b/grpc-google-cloud-os-config-v1beta/pom.xml index c7e2acb8..b4f2b61a 100644 --- a/grpc-google-cloud-os-config-v1beta/pom.xml +++ b/grpc-google-cloud-os-config-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-os-config-v1beta - 1.2.2 + 1.2.4-SNAPSHOT grpc-google-cloud-os-config-v1beta GRPC library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 1.2.2 + 1.2.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index 3780ee49..ce633289 100644 --- a/pom.xml +++ b/pom.xml @@ -75,22 +75,22 @@ com.google.api.grpc proto-google-cloud-os-config-v1beta - 1.2.2 + 1.2.4-SNAPSHOT com.google.api.grpc proto-google-cloud-os-config-v1alpha - 1.2.2 + 1.2.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-os-config-v1alpha - 1.2.2 + 1.2.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-os-config-v1beta - 1.2.2 + 1.2.4-SNAPSHOT com.google.api.grpc diff --git a/proto-google-cloud-os-config-v1alpha/pom.xml b/proto-google-cloud-os-config-v1alpha/pom.xml index 3b50fffb..09e3f768 100644 --- a/proto-google-cloud-os-config-v1alpha/pom.xml +++ b/proto-google-cloud-os-config-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-os-config-v1alpha - 1.2.2 + 1.2.4-SNAPSHOT proto-google-cloud-os-config-v1alpha Proto library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 1.2.2 + 1.2.4-SNAPSHOT diff --git a/proto-google-cloud-os-config-v1beta/pom.xml b/proto-google-cloud-os-config-v1beta/pom.xml index fc56ab8f..0597bba8 100644 --- a/proto-google-cloud-os-config-v1beta/pom.xml +++ b/proto-google-cloud-os-config-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-os-config-v1beta - 1.2.2 + 1.2.4-SNAPSHOT proto-google-cloud-os-config-v1beta Proto library for google-cloud-os-config com.google.cloud google-cloud-os-config-parent - 1.2.2 + 1.2.4-SNAPSHOT From 7aa82a37d247b98f167f6aec047865bfeabd6412 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Thu, 27 May 2021 16:36:39 -0400 Subject: [PATCH 5/5] chore: update dependencies --- google-cloud-os-config/pom.xml | 6 ------ grpc-google-cloud-os-config-v1beta/pom.xml | 4 ---- proto-google-cloud-os-config-v1alpha/pom.xml | 4 ---- proto-google-cloud-os-config-v1beta/pom.xml | 4 ---- 4 files changed, 18 deletions(-) diff --git a/google-cloud-os-config/pom.xml b/google-cloud-os-config/pom.xml index 4d52aa77..e5d21a3f 100644 --- a/google-cloud-os-config/pom.xml +++ b/google-cloud-os-config/pom.xml @@ -77,12 +77,6 @@ junit test - - com.google.cloud - google-cloud-core - test - - com.google.api.grpc grpc-google-cloud-os-config-v1 diff --git a/grpc-google-cloud-os-config-v1beta/pom.xml b/grpc-google-cloud-os-config-v1beta/pom.xml index b4f2b61a..7d75d4be 100644 --- a/grpc-google-cloud-os-config-v1beta/pom.xml +++ b/grpc-google-cloud-os-config-v1beta/pom.xml @@ -29,10 +29,6 @@ com.google.protobuf protobuf-java - - com.google.api.grpc - proto-google-common-protos - com.google.api.grpc proto-google-cloud-os-config-v1beta diff --git a/proto-google-cloud-os-config-v1alpha/pom.xml b/proto-google-cloud-os-config-v1alpha/pom.xml index 09e3f768..60afd98e 100644 --- a/proto-google-cloud-os-config-v1alpha/pom.xml +++ b/proto-google-cloud-os-config-v1alpha/pom.xml @@ -21,10 +21,6 @@ com.google.api.grpc proto-google-common-protos - - com.google.api.grpc - proto-google-iam-v1 - com.google.api api-common diff --git a/proto-google-cloud-os-config-v1beta/pom.xml b/proto-google-cloud-os-config-v1beta/pom.xml index 0597bba8..8522855d 100644 --- a/proto-google-cloud-os-config-v1beta/pom.xml +++ b/proto-google-cloud-os-config-v1beta/pom.xml @@ -21,10 +21,6 @@ com.google.api.grpc proto-google-common-protos - - com.google.api.grpc - proto-google-iam-v1 - com.google.api api-common